rsync over ssh port?

I have changed the ssh port on my target server to (for example 15633). as a result the following command no longer works;

rsync -Cavz --delete root@myip.com:/data /remote

How do I point the command at the new port? I have tried a number of variations and nothing has worked. I have read through the man pages and im still struggling.

many thanks
LVL 1
the_omnificAsked:
Who is Participating?
 
slyongCommented:
Try:
rsync -Cavze 'ssh -p 15633' --delete root@myip.com:/data /remote



or change your /etc/ssh/ssh_config with the line:
Port 15633

and use:
rsync -Cavz --delete root@myip.com:/data /remote
0
 
pjedmondCommented:
The second rsync command:

rsync -Cavz --delete root@myip.com:/data /remote

should be:

rsync -Cavze ssh --delete root@myip.com:/data /remote

as you still want to use over ssh.

HTH:)
0
 
the_omnificAuthor Commented:
it was the 'e' in rsync -Cavze that i was missing. thank you!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.