Friday, November 28, 2014

Doing file transfer in linux by rsync

Make sure ssh and rsync is installed both server.

Then start moving..

You have to put the ssh port if ssh port is different on remote server..

First login to your native server then ..

Use this code :

rsync -av -e ssh root@remote_ip:/home/remoteuser/public_html/test.txt /home/you/public_html

if port is different ..

rsync -av -e ’ssh -p 65200′ root@remote_ip:/home/remoteuser/public_html/test.txt /home/you/public_html

Then enter your password.

Data will be transferred successfully .

After moving you have to remove the entry key from known_hosts file in your server, how you can do  that :

> cd /.ssh/
> vi known_hosts

use ctrl+w to find the ip and key and remove it. Now you are totally secured from another server...






No comments:

Post a Comment