Copying files securely between local machine and shell account.

Hi all…

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 remotemachine.net to mylogin’s home folder… but I don’t want anyone to be able to sniff the files content… Remote machine has SSH server running. Scp is perfect for this task. Its using ssh and its encryption so if You have setup the private and public key You can send the files securely without giving a password…

How to use it?

Syntax:

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

Example:

scp ~/example.txt mylogin@remotemachine.net:~

Result:

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

Check procedure:

Log into the remote machine:

ssh -l mylogin remotemachine.net

List the file:

ls ~/example.txt

Tadaaaa:

/home/mylogin/example.txt

SCP in action

Hope this helps somebody someday.

Andy

AndrzejL

"Never meet Your heroes. Most of the time you'll only end up disappointed." White Polak Male Husband Employee Hetero Carnivorous Fugly Geek @$$hole with ADD Catholic “Some men just want to watch the world burn.”

Comments are closed.