LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Rsync specify SSH port (https://www.linuxquestions.org/questions/linux-newbie-8/rsync-specify-ssh-port-908518/)

suj 10-16-2011 11:58 PM

Rsync specify SSH port
 
Can some one help me in understanding rsync. I need to transfer a file from one server to another server, anyway the ssh port on the destination server is different. So how can I specify it in rsync command ?

Thanks in advance :)

colucix 10-17-2011 01:00 AM

Code:

rsync -e "ssh -p <PORT_NUMBER>" etc etc

meenakshi.khurana 10-17-2011 01:29 AM

rsync -v -e "ssh -p 5757" root@192.168.7.21:/opt/test.txt /opt/ --dry-run

where:

-v - verbose
-e - to secify any remote shell you like
--dry-run - will list files that will get copied without actually being copy. This can be used if you’re not yet ready to copy any files or want to verify what all data will get copied using the command.

Once you verified the data, you can actually copy the data by removing --dry-run option from above command.


All times are GMT -5. The time now is 06:16 PM.