Monday, February 28, 2011

Using SCP to copy files between hosts

To copy remote file to your filesystem use the following syntax:
scp your_username@remotehost.edu:foobar.txt /some/local/directory

To copy local file to remote filesystem use the following syntax:
scp foobar.txt your_username@remotehost.edu:/some/remote/directory

To copy folder to a remote filesystem use
scp -r foo your_username@remotehost.edu:/some/remote/directory/bar