Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Softpanorama Search

SFTP

News SSH Recommended Links Private and Public key management Reference WinSCP
ssh-keygen man page SSH Usage in Pipes SCP Tips humor Etc

SFTP is normally used as an intractive application/protocol, but also can be put into a batch mode with the -b flag. This can be specified with a file or can be directed stdin from an external script.

The password can not be passed by either process.

sftp [-1Cv] [-b batchfile] [-F SSH_config] [-o SSH_option] [-s subsystem | sftp_server] [-S program] host

sftp [[user@]host[:file [file]]]

sftp [[user@]host[:dir[/]]]

But mostly SFTP is used as an interactive file transfer program.

With FTP one might try to copy up all their JPG files to their image directory like this:

ftp> cd /home/user/images/
ftp> bin
ftp> prompt
ftp> mput *.jpg

With SFTP it is much simpler..

sftp> cd /home/user/images/
sftp> put *.jpgtt>

List of SFTP commands (SFTP will abort if any of the following commands fail):

List of other commands:

SFTP may also use many features of SSH, such as public key authentication and compression. SFTP connects and logs into the specified host, then enters an interactive command mode. The second usage format will retrieve files automatically if a noninteractive authentication method is used; otherwise it will do so after successful interactive authentication. The last usage format allows the sftp client to start in a remote directory. 

Here are the options used:



Copyright © 1996-2009 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Disclaimer:

Last modified: August 12, 2009