R-Ts NetWorks

Server the Best

Transferring a file between two remote servers


How to transfer a file from one remote server to another remote server? Passwords for both the servers are available.

Solution :

You can use the ‘scp’ command to achieve this.

Assuming that the file test.txt resides on server1 and needs to be transferred to server2.

Open the terminal of your local Linux machine and type the following command :

scp your_username@server1.com:/some/remote/directory/test.txt \your_username@server2.com:/some/remote/directory/

This will prompt you for the passwords. Once you enter them, it should go through fine.

OR

rsync -av –progress –rsh=”ssh -l user” folder/ 00.00.00.00:folder/

rsync -v -e ssh cpmove-user.tar.gz sshuser@00.00.00.00:~
rsync -av –progress –rsh=”ssh -l sshuser” folder/ 00.00.00.00:folder/

This will prompt you for the passwords. Once you enter them, it should go through fine.

Advertisements

October 13, 2012 - Posted by | Linux

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: