What is SCP?
SCP stands for security copy protocol and uses ssh in order to transfer files from a computer to another.
Sintaxe
scp
[options] [origen] [destination]
[options]
-P: Port number, no need for 22
-C: Compress option
-r: Recursive option, used to copy entire folder
-i: ssh-key path
-c: criptografy
[Allowed values are 'aes128-ctr', 'aes128-cbc', 'aes192-ctr', 'aes192-cbc', 'aes256-ctr', 'aes256-cbc', 'blowfish-cbc', 'arcfour', 'arcfour128', 'arcfour256', 'cast128-cbc', and '3des-cbc'.]
E.g.
scp -P 7000 -i ~/.ssh/id_rsa -C -c aes128-ctr -r 192.168.0.3:~/myfolder ./
SSH Config file
You can even use your ssh config file (~/.ssh/config).
Coping from
scp bastian:~/orig/file.txt ~/dest/file.txt
Coping to
scp ~/orig/myfile.txt bastian:~/dest/myfile.txt
IMPORTANT NOTICE: This image was Image by storyset on Freepik on Freepik