Copy files to, from, or between different hosts using Secure Copy (scp)

Secure Copy (scp) copies files between hosts on a network. It uses SSH (Secure Shell) for data transfer, and uses the same authentication and provides the same security as SSH.

 Posted December 18, 2016

Examples:

Copy the file “foobar.txt” from a remote host to the local host:

Copy the file “foobar.txt” from the local host to a remote host:

Copy the directory “foo” from the local host to a remote host’s directory “bar”:

Copy the file “foobar.txt” from remote host “rh1.edu” to remote host “rh2.edu”:

Copying the files “foo.txt” & “bar.txt” from the local host to your home directory on the remote host:

See more scp examples:

Leave a Reply

Your email address will not be published. Required fields are marked *