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.

learn more… | top users | synonyms

3
votes
0answers
26 views

SSH with chroot and only working “sftp”, “rsync” (both)?

I have two users and one shared folder in my Ubuntu server: User writer, which has write access to /var/shared. It's an application regularly making file changes in this folder from remote, with SSH ...
7
votes
1answer
844 views

sshfs breaks symlinks from SFTP server

Does anyone know how to mount a remote SFTP path via SSHFS so that you can work with symlinks? When I do this, all the symlinks I create point to the wrong files (not the ones I linked to.) All the ...
0
votes
4answers
2k views

Script SFTP with password - HP-UX

I would like create a script in HP-UX to send in sftp with password. I have this command sftp -o PasswordAuthentication= but if I answer yes or no after, I have this issue "Host key verification ...
3
votes
1answer
33 views

Read only permission to sftp user in specific directory

I want to create specific SFTP user which will have permissions to only read all folders and subfolders in /var/www/vhosts. Any help on this ?
5
votes
2answers
12 views

Can you scp, sftp, or rsync, a pipe?

I want to tar and send a ~700GiB directory to a remote drive I don't control. I don't have the HDD space locally to create the tarball and then copy that over. The remote is also protected by rssh - ...
-2
votes
1answer
44 views

Sending files from Unix to multiple windows systems [closed]

I need to send some files to multiple Windows systems from a unix server, since MS Windows does not ship with any secure file transfer programs such as SCP or SFTP is there any other option to send ...
1
vote
2answers
65 views

Copy files that are created today without FIND command and SFTP to another server

I have a directory with 'n' number of files in it. I am trying to write a shell script which will list only the files created on the particular day the script is running, and will use sftp to move the ...
3
votes
2answers
16k views

sftp a file using shell script

I have read through several threads (which have been helpful) and I'm still getting an error when trying to sftp a file (client wants it to be sftp'ed) Here is the script: #!/bin/bash HOST=XX.XX....
0
votes
1answer
30 views

How do I get SFTP/FTP setup

So I have another question, I would like to setup FTP/SFTP I know that ftp is not as secure but what I am trying to accomplish is to allow a user (web) to be able to login via sftp or ftp and upload/...
2
votes
1answer
34 views

Duplicity backup via sftp finishes without errors but no files transferred to remote host, why?

I want to use the following command to do a remote backup of /home: duplicity full /home sftp://user@hostname.com/home/user/backup When the command is run I get the following output: Local and ...
0
votes
1answer
41 views

How to run a for loop block which is within a shell script after connecting to another server using sftp?

The script.sh takes a list.txt (which contains list of files present on both server A and server B) file as command line parameter and reads the list .It then connects to server B using sftp and ...
2
votes
2answers
2k views

Script to get file from SFTP and run it

We have 5 servers running our code: A, B , C, D and E. From a local machine, we sftp the file to A. Then ssh id@A su - applicationname sftp id@A get <file> bye tar -xzf <file> logout ...
1
vote
5answers
4k views

Save a list of files over SFTP to a text file

I have provided my own answer below. We have a number of bash scripts that work fine using SFTP, what I would like to do is to simply re-direct an ls or dir of a folder to a file on our SFTP Server.. ...
0
votes
1answer
38 views

Using a username starting “##” at a bash prompt

Some clown made me a sftp username that started with ##. Now I don't know if the command is wrong or the ftp server isn't responding for certain. Could someone please confirm for me that this should ...
1
vote
0answers
18 views

setting up sftp users only second instances of sshd

I created second instances of sshd called sshd-sftponly and using different port (e.g 2222 ) and made all necessary changes in /etc/rc.d/init.d/sshd-sftponly and /etc/ssh/sshd_config-sftponly ...
0
votes
1answer
809 views

IP address of the username who uses sftp connection in unix

We have SFTP connection in unix location.How can I find the IP address of the particular username with whom we have SFTP connection to share the files?
1
vote
2answers
976 views

How to give sftp access to sub-directory only not to parent

I want to give SFTP access to user tom for directory /var/www/html/my_project/. while I don't want to give any SFTP access to directory /var/www/html/. currently /var/www/html/my_project/ and /var/...
1
vote
4answers
459 views

All files are not getting downloaded by SFTP script

I have a sftp file script with below details,my server folder like BCP11,BCP12,BCP13,BCP14.....BCPXX. In which BCPDUMP folder have files. Filename : file_sftp.sh #!/usr/bin/expect spawn sftp user@...
0
votes
0answers
34 views

Files not appearing immediately on remote system after SFTP put command

I'm encountering a bizarre issue. I'm sending files to a remote machine using SFTP's put command. However, even though my machine says the transfer is finished, the files don't appear immediately in ...
1
vote
3answers
52 views

How to list files and only files via SFTP?

I can list file names actually but a lot of unwanted stuff comes from there also. > echo "ls *.txt" | sftp user@host:/dir Connected to 1.1.1.1. Changing to: /dir sftp> ls *.txt 1.txt 2.txt 3....
1
vote
1answer
48 views

Bash script SFTPing into remote server and downloading files, cd into proper directory on local machine

I have a cron on my Ubuntu server that runs this bash script daily: #!/usr/bin/expect -f spawn sftp user@ip expect "password:" send "password\n" expect "sftp>" send "cd remote_directory\n" expect "...
1
vote
0answers
65 views

Changing permissions of the file, while using sftp command in a shell script

How can I change the permissions of the file/command, while using the sftp command via a shell script? My sftp connection is established, but it fails while executing the chmod command. As of now, I ...
-1
votes
1answer
59 views

AIX: How to find sftp file limit?

Can anybody please help to find sftp file limit on following version on AIX (7.1.2.3). I have following values set I am not able sftp a 110 KB file. ulimit -a time(seconds) unlimited file(...
0
votes
0answers
35 views

Cannot ssh into server through VPN

I'm trying to ssh into my university server via vpn (PPTP). I'm on an Mac OSX 10.11.4. (El capitan) Unfortunately, I get the following error: Adams-MacBook-Pro:~ adamG$ ssh gadam@xxx.xx.xx.ac.uk ssh:...
0
votes
0answers
34 views

Vsftpd server will not create ftp user directory

When I try to login to my ftp server I get 500 OOPS: cannot change directory:/mnt/users/alex When I try to do the same thing with sftp I get packet_write_wait: Connection to 10.0.0.8 port ...
0
votes
1answer
28 views

How to SFTP into a KVM VM on remote RHEL 7.2 server?

We have a RHEL 7.2 server which runs a virtual RHEL 7.2 machine on KVM. The only way to connect to this VM is to SSH to the server and then SSH again to the VM, using a user on server. How can I ...
50
votes
7answers
78k views

Uploading directories with sftp?

I'm having some trouble uploading directories(which contain other directories a few levels deep) by sftp. I realize I could work around this by gzipping, but I don't see why that's necessary. Anyway, ...
1
vote
1answer
476 views

nmap doesn't appear to list all open ports

My rental Linux server doesn't respond to nmap the way I thought it would. When I run nmap it shows three open ports: 80, 443 and 8080. However, I know ports 2083, 22 and 2222 should all be open, as ...
1
vote
2answers
65 views

Can lftp read netrc for sftp-connections

I am trying to create a script to upload some files to a server via SFTP. I can do that manually by opening an interactive lftp-session and providing username and password there. For the script, I ...
1
vote
0answers
32 views

PSCP - why can't it find the file when using non-admin credentials?

I am trying to make a batch script to get files from Windows vm to Ubuntu vm so I decided to use pscp. when I put pscp -l admin -pw pswd C:\path admin@IP:/path the files transfer fine but I don't ...
0
votes
2answers
50 views

SFTP suppress all messages except errors

I want to 'put' a file from local system to FTP server using sftp (only) from bash script. I want to suppress all messages except errors: sftp $user@$server 2>&1 1>/dev/null <<EOF ...
3
votes
1answer
57 views

Can I use `internal-sftp` when using wrapper script with `ForceCommand` in sshd?

I use /etc/ssh/wrapper.sh script, like in tutorial, that filters which commands are allowed to be run via ssh and logs them. Currently when internal-sftp is required, I use /usr/lib/sftp-server. Is ...
6
votes
2answers
180 views

Can not create SFTP user Debian 7

I have a linode and I access via ssh throw terminal. I need to create an sftp user which his default directory (and the only he can access) is /var/www/xxxxxx.com/public_html/directory Now, I did it, ...
3
votes
2answers
8k views

Why does the filename contain question marks when I run a script on my remote machine?

I have a tiny script that simply fetches the current date, runs a PHP script and redirect the output (and errors) to a filename containing the current date. DATE=$(date +"%Y%m%d") FILE="log/${DATE}....
8
votes
4answers
18k views

How to send multiple commands to sftp using one line

The following command sends one command to sftp using one line: sftp -o PasswordAuthentication=no user@host" <<<"lcd /home" How to send multiple lines to sftp using one line. Is there a ...
0
votes
2answers
37 views

Copying script files using wildcards

We have an SFTP location which is shared by two processes. Now we have a situation when we need to filter based on the filenames before copying. ClientA12345.out ClientA44378.out ClientB23478.out ...
1
vote
1answer
1k views

How to add sftp permission to user/client?

I am somewhat new to linux, so please bear with me... I'm on a new Centos 7 setup. So far I have logged in via ssh as root: added a new user gave user full permission via visudo added user to the ...
0
votes
1answer
35 views

Is there a command-line application that combines SSH and SFTP? [duplicate]

When I'm working on some remote host via SSH, I often need to upload or download files. With my current setup, I need to switch to another terminal and conjure up rsync or sftp, which can be a pain ...
0
votes
0answers
121 views

SFTP connection using public key (without password) not working

I need to provide sftp access to a client to my ftp server and this is working fine. For them to access our server without using password - we have followed the below steps on our server. Created ...
2
votes
1answer
95 views

How to write in home user with chrooted sftp

I have a problem with chroot sftp an their home folder. I would like to write in user's home but I don't have proper permission for doing that. sshd_config Match User demo ChrootDirectory %h ...
15
votes
7answers
55k views

Using sftp to Transfer a Directory?

When I try to use sftp to transfer a directory containing files, I get an error message: skipping non-regular file directory_name The directory contains a couple of files and two subdirectories. ...
0
votes
3answers
106 views

SFTP Automatic Login

I want to know how can I connect automatically using sftp with a password as an argument in the same command to get the automatic login an execute once. Example: I want to put it into a script, and ...
0
votes
1answer
35 views

Backup mysql database via sftp

I have recently messed up my debian server and I have only sftp access for my files. I rescue almost everything except of my database. I have no longer direct ssh access, other than in rescue mode, ...
0
votes
1answer
72 views

SSHFS on Asus DSL-AC68U router

I have an Asus DSL-AC68U router. I can easily ssh to it: ssh router After having configured the proper options in .ssh/config: Host router Hostname ddnshostname User myuser KexAlgorithms +diffie-...
3
votes
3answers
126 views

Transfering files via ssh but without scp or sftp

I need to transfer files via ssh, but unfortunately scp and sftp are not viable, as the host I am connecting is just a "door" node that is redirecting me to a different machine available only on a ...
0
votes
1answer
66 views

I can SFTP but not SSH

This question is similiar, but I'm experiencing the reverse scenario. SFTP works but I'm not yet connected using SSH. I'm using a config file and I'm able to sftp to remote server. Local machine is ...
1
vote
2answers
131 views

ssh login works but sftp does not

I can use ssh to login-in Centos by Xshell, but I can not download files from Centos by FileZilla. I have tried to login-in in different network or computer, the result is still the same. However, ...
0
votes
0answers
68 views

Last doesn't show sftp logged users

To check users being logged on a web server I would like to use only last command. I know it can show all login sessions both ssh and sftp (ftp). This is what I had on CentOS 6.6 when using the last ...
1
vote
1answer
27 views

How I can change the home directory of the sftp server on MAC OS X?

I'm trying to set up SFTP's home directory on a MAC OS X Mavericks for user my_user. Now, it looks like: /Users/my_user (i got it with sftp> pwd command) but I want it be: /Users/my_user/Documents/...