CS 160A - SCP/SFTP

For more info, refer to Greg's notes on scp/sftp

Chapters 4 - 7 of Shotts text will be covered next

sftp is useful for transferring individual files between systems. It can also be useful if you need to retrieve a file from a remote system and you don't know what the file is.

scp is useful to transfer one unite of information nad you know exactly where the information is. Alos, there is the option to transfer entire directories.

sftp

Never use ftp. Any protocol that requires username and password should be encrypted.

A connection is initiated using:

sftp [user@]remotesystem
scp

It is very common to need to copy a single piece of information between systems. This may be a file or a directory. In this case, scp is much easier than sftp. Note that with scp you connect, transfer and disconnect in a single command.

To copy to a remote system:

scp [ -r ]  localpath  [user@]remotedomain:[remotepath]

To copy from a remote system:

scp [ -r ]   [user@]remotedomain:remotepath  localpath

For more info, refer to Greg's notes on scp/sftp