How to use rsync for custom SSH port

March 3, 2013 · Filed Under Linux Commands 

By default rsync uses SSH port 22 while transferring the files/folders between two servers. If you are using custom SSH port instead of default port 22, you will need to add additional flag in rsync command as follow:

rsync -avz -e “ssh -p YOUR_SSH_PORT” user@SERVERADDRESS:/home/test /home/abc/

For more rsync option, you can use the following in your SSH:

[root@server ~]# man rsync

While using man command, if you receive an error called “bash: man: command not found”, you will need to install man on your server. For more details refer “Linux – man: command not found” article.

Kailash Aghera

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

Comments

Leave a Reply

You must be logged in to post a comment.

Untitled Document

Email
Print
WP Socializer Aakash Web