O'Reilly logo

Ubuntu Unleashed 2014 Edition: Covering 13.10 and 14.04,Ninth Edition by Paul Hudson, Andrew Hudson, Matthew Helmke

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using sftp to Copy Many Files Between Machines

sftp is a mix between ftp and scp. Connecting to the server uses the same syntax as scp—you can just specify an IP address to connect using your current username, or you can specify a username using username@ipaddress. You can optionally add a colon and a directory, as with scp. After you are connected, the commands are the same as ftp: cd, put, mput, get, quit, and so on.

In one of the scp examples, we copied a remote file locally. You can do the same thing with sftp with the following conversation:

matthew@seymour:~$ sftp 192.168.1.102Connecting to 192.168.1.102...matthew@192.168.1.102's password:sftp> get remote.txtFetching /home/matthew/remote.txt to remote.txt

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required