Pages

Saturday, February 14, 2015

HowTo Transfer files via SSH

If you need to transfer some files from one linux box to another using SSH.

Transfer foobar.avi from a remote computer to your computer:
scp batman@192.168.1.100:/home/remotepc/foobar.avi /home/foobaring/foobar.avi
"dont forget the colon between 192.168.1.100 and /home/remotepc"

Transfer foobar.avi from your computer to a remote computer:
scp /home/foobaring/foobar.avi batman@192.168.1.100:/home/remotepc/foobar.avi

"dont forget the colon between 192.168.1.100 and /home/remotepc"

Tranfer folders from a remote computer to your computer:

scp -r batman@192.168.1.100:/home/remotepc/remote-folder /home/foobaring/local-folder
"this will copy the folder remote-folder and its contents into local-folder in your computer"

Stuffs:
batman - user on the remote computer
192.168.1.100 - ip address of the remote computer
/home/remotepc/foobar.avi - file that you want to get from the remote computer
/home/foobaring/foobar.avi - location where you want to save the transferred file in your computer
-r - recursive, used for copying folders

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.