Last modified: Apr 11, 2008 by Kachelhoffer

SSH: to transfert a file with the sftp command


 1. Definition
 2. Usage

1. Definition

The sftp command allows you to copy a file or a directory between two servers. The path of the server could be given in absolute (/home/dupont/Directory for example) or relatively from the base directory Directory. To use sftp, you should know the correct paths of the directories on the remote server. Also, SSH should be installed on the two servers which should communicate to make your transfert.
BE CAREFULL: at Computing Center, you should give your password. It is not possible to make an authentification using SSH keys exchange (see To connect at Computing Center using SSH).

2. Usage

sftp [-vC1] [-b batchfile] [-o ssh_option] [-s subsystem | sftp_server]
          [-B buffer_size] [-F ssh_config] [-P sftp_server path]
          [-R num_requests] [-S program] host
sftp [[user@]host[:file [file]]]
sftp [[user@]host[:dir[/]]]
To obtain some help, type in an interactive session:
> man sftp