sftp is a mix between
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
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...email@example.com's password:sftp> get remote.txtFetching /home/matthew/remote.txt to remote.txt/home/matthew/remote.txt 100% 23 0.0KB/s 00:00 ...