Secure Copy (
scp) is a Linux remote file copy command. It can be used like the Copy (
cp) command but supports the secure transfer of file between hosts on a network.
The basic synopsis for this program is as follows. See the manual page for more information.
scp [[ user@ ] host1: ] file1 ... [[ user@ ] host2: ] file2
To copy a file from a remote machine to the local host.
scp [email protected]:file.txt /home/yourusername/
To copy a file from the local host to a remote machine.
scp file.txt [email protected]:/remote/directory