Copy Files Securely Between Local Machine & Shell Account

by AndrzejL

Lets say that I have created a VERY important file. Its a file called example.txt, and it’s placed in my home (~) folder:

touch ~/example.txt

I want to copy this file to my, mylogin’s home folder, but I don’t want anyone to be able to sniff the file’s content. The remote machine has SSH server running. Scp is perfect for this task. It uses encrypted ssh.

How to use it?


scp /path/to/secret/file.ext who@host:/where/to/save/


scp ~/example.txt


example.txt 100% 0 0.0KB/s 00:00

Check procedure:

Log into the remote machine:

ssh -l mylogin

List the file:

ls ~/example.txt



I hope you find this helpful.