25
Jun

Simple copy through SSH

   Posted by: Vlad   in Linux

Copying files between remote machines can be easily done
using SCP command.

The syntax is:

copy from a remote machine to my machine:

scp user@192.168.0.1:/home/file.txt /home/x.txt

copy from my machine to a remote machine:

scp /home/x.txt user@192.168.0.1:/home/x.txt

copy all x*.txt from a remote machine to my machine (x01.txt, x02.txt, etc.)

scp “user@192.168.0.1:/home/x*.txt” /home/x.txt

copy a directory from a remote machine to my machine:

scp -r user@192.168.0.1:/home/folder /home/

Tags: , , , , , , , , , , , , , , , , , , , , , , , ,

This entry was posted on Wednesday, June 25th, 2008 at 4:08 pm and is filed under Linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One comment

 1 

To copy from one machine (machine2) to other machine (machine3), but by using a different machine (machine1):
Execute below command in machine1
scp user2@machine2:/path2 user3@machine3:/path3

August 8th, 2008 at 6:50 am

Leave a reply

Name (*)
Mail (will not be published) (*)
URI
Comment