SCP : Secure file transfer over the network


SCP, for Secure CoPy, is an SSH based software that allows you to copy files between UNIX/Linux machines.

It is included in OpenSSH and the SSH daemon on all mayor Linux & *BSD distributions, listening on port 22 by default.


SCP works like the well known command “cp”, by adding the required network information (IP, FQDN).

scp /my/file.txt

This will copy the file “file.txt” in the home folder of the user “myuser” to the remote server.

It is also possible to use it the inverse way:

scp /my/

This will copy the remote file to the local disk.


SCP allows to do recursive copies. Basically this means to copy all its content instead of launch the copy file by file.

Below an example:

scp -r /my

We will now find the directory “my” available in the remote home folder.

As previously seen, this works also the inverse way:

scp -r /

If you are interested in more information, feel free to read the manpage of scp. It offers a lot of other functionalities:

man (1) scp