Questions tagged [sftp]

The SSH File Transfer Protocol (SFTP) provides secure file transfer functions using the same infrastructure used by the Secure Shell protocol. It can be seen as a secure replacement for FTP.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

How to allow users to ssh when sftp enabled

We have an nfs share which is mounted to /mnt/logs. User A is found within group sftp (in active directory) and can only sftp to /mnt/logs. In sshd_config we have: Match Group sftpgr X11Forwarding ...
1 vote
0 answers
32 views

Upload file to SFTP directly from HTTP using cURL

I am struggling with uploading a file to an SFTP from a URL. All steps work independently but when I combine them they seem to be split into two separate tasks, downloading the file and then ...
-1 votes
0 answers
29 views

How to access an SFTP in python in WSL?

I'm testing how to connect an sftp through python. import pysftp host = 'fnord' port = 22 username = 'fnord' password= 'fnord' try: conn = pysftp.Connection(host=host,port=port,username=username, ...
0 votes
1 answer
15 views

CentOS7 Log User Activity from SFTP

I haven't been able to figure out how to log user activity for my SFTP on my CentOS 7 server. I have configured rsyslog to send logs to my Syslog Server. I would like to do the same with user activity....
  • 1
0 votes
1 answer
43 views

Shell script with EXPECT and PUT to SFTP server

I'm working on a shell script and I'm trying to send a backup file to a sftp server : remotepath=/backup/ expect -c " spawn sftp user@172.11.23.4 expect "password:" send "...
0 votes
0 answers
44 views

SFTP as root CentOS Stream 9

sorry if this has been asked before. I've done loads of Googling and not found anything different to what I have already done, I think I'm missing something. I have a test CentOS Stream 9 server which ...
0 votes
0 answers
12 views

Network drive on external vServer

I plan to create different folders on an external vServer that should be shared. e. g. Should there be several private folders (user folder a, user folder b). User folder a should be accessible only ...
  • 1
0 votes
0 answers
39 views

Cannot Connect To Ubuntu Based VPS Using SSH

I recently re-installed my VPS to have it clean and build it from the ground up. The VPS is from Contabo and runs Ubuntu 22.04. I set the password in the re-install and went to log in via SSH on my ...
0 votes
0 answers
53 views

ssh_exchange_identification: Connection closed by remote host for CentOS 6 systems

I am trying to sftp to a site but it keeps disconnecting me with an error message "ssh_exchange_identification: Connection closed by remote host". It only happens on CentOS 6 machines, so it'...
0 votes
1 answer
47 views

SFTP Only Users Unable to Delete/Edit Files They Create

I modified /etc/ssh/sshd_config with these lines to support an sftp user group that isn't able to SSH. Subsystem sftp internal-sftp -l VERBOSE Match Group sftpusers X11Forwarding no ...
0 votes
0 answers
44 views

REMOTE HOST IDENTIFICATION HAS CHANGED: sftp -v -o HostKeyAlgorithms=... : Cannot use "ecdsa" and "rsa" in parallel

When I connect to my "OpenSSH_8.2p1 Ubuntu-4ubuntu0.4" server alternating using "sftp -v -o HostKeyAlgorithms=ecdsa-sha2-nistp256 test-user@localhost" and "sftp -v -o ...
0 votes
0 answers
173 views

Shell Script to transfer file to SFTP

I m trying to write shell script to transfer file from Linux to SFTP. I m not in Linux but was just trying by seeing youtube & reading. When I m trying to run that script it gets stuck & doesn'...
  • 1
0 votes
0 answers
117 views

scp multiple files with single command

I have seen this question: https://stackoverflow.com/questions/16886179/scp-or-sftp-copy-multiple-files-with-single-command But for some reason it does not work for me. If I run: scp me@remote:/path/...
0 votes
1 answer
28 views

Connecting to the sftp server hosted in Windows from Linux

We have a directory (hosted on Windows) named "groupftp" that is shared and is accessible from our Linux server We connect through it from our linux machine with the below sftp command and ...
0 votes
1 answer
172 views

Is it possible to use two-factor authentication with any SFTP client?

Is possible to integrate two-factor authentication for transferring files or uploading the codes to a web-server? If yes, will it work for any client or it will work for a specific SFTP client?
  • 3,005
0 votes
1 answer
76 views

is there any way to transfer file in Ascii mode using ftp or sftp

We have a server and we need to transfer file in Ascii mode. While transferring : when we use "ftp" command getting below error Error: 530 Log on attempt by user rejected (530 Secure ...
  • 262
0 votes
0 answers
280 views

no matching key exchange method found when using SFTP

My remote server(A) is having RHEL 8 OS and another server(B) runs with RHEL 5. I need to SFTP to server A to B. I have used below method. sftp usr@10.58.148.111 But I am getting below error. Unable ...
  • 51
0 votes
1 answer
112 views

Why do I not need to start an SFTP Server ( why does SSH automatically start SFTP )?

Question When I start SSH server, my Debian automatically start the SFTP server as well - why is it design in such way? Environment: Linux 5.10.0-14-amd64 Debian 5.10.113-1 (2022-04-29) x86_64 GNU/...
  • 411
0 votes
0 answers
78 views

ls -ltr and ls -lt inside an sftp session are giving the same sort order

I am using sftp from a Mac to a linux server. The directory of interest contains several files named file_*datetimestamp* that were created on different datetimes in addition to files named ...
  • 1
3 votes
1 answer
207 views

SSH connect to a docker container directly, without ssh the host first

On my local computer, I connect with ssh to a distant VPS: ssh user@1.2.3.4. In this VPS, a docker container is running (for example docker pull nvidia/cuda:11.4.0-devel-ubuntu18.04 and docker run -...
  • 2,179
0 votes
0 answers
38 views

SFTP jailed user access limited to an Apache webserver directory

I would like to create an SFTP jail for a user, jailed to an Apache webserver directory. User should access only /var/www/html/sftpaccess/ directory. Currently the /var/www/html/sftpaccess/ ...
  • 404
1 vote
2 answers
421 views

SSH/SCP CLI Connection Works Correctly, but SFTP via GUI Refuses to Connect

I recently configured a new web server (AWS EC2 instance) running Ubuntu 22.04. I am able to connect to the server via SSH/SFTP/SCP through a CLI on both Windows and Mac, but when I attempt an SFTP ...
2 votes
0 answers
196 views

SFTP user permission denied

I have created a new sftpuser with below format. sudo adduser --shell /bin/false sftpuser sudo passwd sftpuser sudo mkdir -p /var/sftp/files sudo chown sftpuser:sftpuser /var/sftp/files sudo chown ...
  • 51
0 votes
0 answers
20 views

sftp to webserver behind proxy [duplicate]

I host a couple of websites on a webserver Centos 7 that is behind an ubuntu 20.04 proxy server (apache for http), as depicted in the figure below. Up until now there was no need to have sftp access ...
1 vote
0 answers
33 views

How to force Group for new folders IN new folders with SFTP Ubuntu

I'm running into this issue where I use g+s and a chgrp to set the group, but when I create a new file or folder in a new directory, it doesn't inherit the group. For example: /dir1 has g+s and a ...
0 votes
1 answer
48 views

How to use if function in shell scripts?

I need to use if function to filter out required files only when using SFTP to copy files to my server from a remote server. Here is my try to get the all data inside /filesnew. #!/bin/bash files=`...
  • 51
0 votes
0 answers
204 views

SFTP: rename/remove commands fail intermittently

I have a background job written in Ruby that connects to several SFTP servers, download some files and finally, move the downloaded files to another folder in the sftp server. The issue is that the ...
  • 212
0 votes
0 answers
370 views

How can I speed up my lftp uploads when I'm mirroring?

Here's my script: #! /usr/bin/bash set -xe local_path="${1-./}" lftp -u user,pass host << EOF set ftp:ssl-allow yes set ftp:ssl-protect-data yes set ftp:ssl-protect-list yes set ftp:...
1 vote
1 answer
69 views

SFTP from local desktop to Solaris 11 using client tools is failing

I am trying to copy files from my local drive to Solaris 11 host using WinSCP and it is failing with the below error message: Cannot initialize SFTP protocol. Is the host running an SFTP server? I ...
  • 15
3 votes
2 answers
340 views

Compare files across servers

Once upon a time I remember doing something roughly like this: vimdiff <(scp://some_server/home/user/.zshrc) <(scp://some_server-qa/home/user/.zshrc) (where some_server and some_server-qa are ...
  • 8,605
0 votes
0 answers
30 views

How to stop linux user even being able to see other user's directories

I'm building an sFTP solution but I can't stop group1user from seeing or more exactly listing group2user's directories. I've configured it so that group1user can't actually get into group2user's ...
1 vote
1 answer
370 views

Ubuntu SFTP Client with sudo capability

Recently I completely switched to Ubuntu for my work computer. But I have one problem. On Windows I used WinSCP to connect to remove development server via SFTP and I can't find any app for Ubuntu ...
2 votes
0 answers
32 views

Permission when setting up sftp on Ubuntu

Okay, so I'm setting up an sftp server on Ubuntu 20.04. There will be multiple users accessing the box through sftp and I want each one of them to only have access to their own directory. I don't want ...
  • 473
0 votes
0 answers
33 views

sftp directory-change shortcut

If sitting at an arbitrary unix desktop system and using sftp (e.g. OpenSSH as shipped by Debian) to contact another arbitrary system, is there any shorthand that can be used to switch to the same ...
0 votes
0 answers
34 views

Sftp passwordless systemctl ask for password , but /etc/sbin/sshd -d not

I have two environments a Qual and a Prod environments. I am trying to setup a passwordless connexion with usernologin. Everything is working well on the Qual environment. Permissions on .ssh ...
1 vote
1 answer
485 views

sshd_config ForceCommand is blocking scp

I want to execute certain script on every SSH connection for admin user, for that I have added below lines to sshd_config: Match User admin ForceCommand /etc/my_script.sh Script is getting executed ...
  • 11
0 votes
2 answers
97 views

How to transfer files between two server accounts

I have two server accounts (tow student user accounts of same university Linux server). I would like to transfer files between them using SFTP command. I tried to login the first user account using $ ...
3 votes
1 answer
143 views

Accessing directories outside of chroot jail

I'm setting up an SFTP server that several different clients will use. My main issue is that it's absolutely crucial that employees of one client DO NOT see even the directory names of other clients' ...
  • 31
0 votes
0 answers
17 views

Issue with SFTP URIs for grouped hosts in SSH config file

I'm enjoying the possibility to group the various hosts in ~/.ssh/config by prefixing them with a word/string and a slash: Host Development/alpha Hostname 1.2.3.4 User superman ...
6 votes
1 answer
812 views

Different timestamps in SFTP "ls -l" vs. "ls -lh"

I have a 3rd-party SFTP server on which I want to check some file timestamps. However, I do get different results for the same file if I use ls -l vs. ls -lh: sftp> ls -l [...] -rwxrwxrwx 1 0 ...
1 vote
1 answer
229 views

Copying files over SSHFS/SFTP/SCP is slow [closed]

I'm trying to copy large files (~5GB, one file) between Windows and (remote) Linux. Windows and Linux are on the same LAN, but over VPN connection. They are physically far from each other, but ...
  • 209
1 vote
1 answer
67 views

SFTP dual authentication with batchfile

I'm trying to connect to a server where dual authentication (publickey,password) is enabled. I'm using sshpass to provide password to automate the script, but when I have batchfile with SFTP, ...
  • 1,519
0 votes
1 answer
1k views

How to list all files and get the total size of all files in an sftp server?

I am connected to an sftp server using sftp -i key.pem user@server The server contains logs and I can list logs up to 4 days old using ls. The problem is that ls does not seem to be able to fetch ...
  • 933
0 votes
0 answers
167 views

Change default SFTP directory in Cygwin

On a Windows server, I've installed OpenSSH via Cygwin to mainly connect via SFTP. I would like to change the default directory for the SFTP server. When I log via ssh to this server, my entry point ...
  • 161
1 vote
0 answers
1k views

Download file via SFTP one line CLI command with password containing special character (no ssh key)

I've got a Synology that needs to download and archive a file from SFTP server. I used to use WGET when FTP protocol was being used, but the file owner changed the protocol to SFTP. wget -m ftp://...
0 votes
1 answer
85 views

zftp connection refused, sftp works

When I try to sftp into a virtual machine's IP address it works well (I am able to do all the sftp provided operations). But when I try to use zsh's zftp for the same IP address, the connection is ...
0 votes
1 answer
78 views

How to forward output of split to sftp?

I have a server that is running out of disk space. I want to move some TB sized directories into a long term archive. This is a tape robot with preferred file size of 16GB. Therefore I want to split ...
  • 15
1 vote
1 answer
455 views

SFTP giving all permissions to a user

How can I give all permissions to a SFTP user? I mean to have acess to all folders, delete and upload as they want.(I'm on ubuntu 20.04)
0 votes
1 answer
135 views

How to use MPUT in PSFTP to put the file with permission 777?

I don't want to use chmod 777 *.xml so how I can use MPUT to put the file with permission 777? Without using chmod 777 *.xml the default file permission becomes 0664. This is my script dir lcd E:\...
1 vote
1 answer
389 views

Connecting to SFTP with PcManFM

When I run pcmanfm 'sftp://user@machine', it gives me a 'Operation not supported' error. I think I'm just missing some software for mounting sftp connection into the file system, but I have no idea ...
  • 113

1
2 3 4 5
13