Monday, February 22, 2016

Linux: Secure copy (scp) cheatsheet

Copy the file "foobar.txt" from a remote host to the local host:
scp username@remotehost.com:foobar.txt /some/local/directory

Copy the file "foobar.txt" from the local host to a remote host:
scp foobar.txt username@remotehost.com:/some/remote/directory

Copy the directory "foo" from the local host to a remote host's directory "bar":
scp -r foo username@remotehost.com:/some/remote/directory/bar


Ref:
Example syntax for Secure Copy (scp)

No comments: