Copying Files over the Network with scp

To ”’send”’ file or directory ”’to a remote computer”’:
scp -r [/path/filename] [login name@ip address] :

To ”’retrieve”’ file or directory ”’from a remote computer”’  ”’address in your pc”’:
scp -r [login name@ip address] : [/path/filename]  [/path/filename]

Here are the meaning of scp command options:

-r — recursively copy entire directory
. — current directory


To copy all txt files in the current directory to your home directory on the destination machine:
scp *.txt

To copy txt files to a destination directory. You have to have write permission on the target directory:
scp *.txt

To retrieve files from the other machine back to the one you’re on:
scp*.txt /home/support/Desktop

You may also like