Rsync with non-standard ssh ports

This problem appears when I try to rsync directories with hosts inside a cluster used NAT for forwarding ports to internal nodes. Hence, the ssh port for internal nodes are not the default 22. So, how to use rsync with the non-standard ssh ports?

asked Feb 18, 2014 by Eric Z Ma (44,280 points)

1 Answer

 
Best answer

The -e options of rsync play the trick very well. For example, to use ssh to example.com with port 13022:

$ rsync -avxP --delete -e "ssh -p 13022" \
you_username@example.com:/remote/path/ /local/path/
answered Feb 18, 2014 by Eric Z Ma (44,280 points)
edited May 20, 2014 by Eric Z Ma

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...