rsync issue: directing rsync to non-standard ssh port

Gilbo

Storage is cool
Joined
Aug 19, 2004
Messages
742
Location
Ottawa, ON
I have port forwarding enabled on the router on the other end. Port 22022 is forwarded to port 22 on the relevant machine on the other end. I thought using the port parameter would make it connect (like with ssh), but it's timing out :(. I'm clearly just doing this wrong; does anyone have any ideas?
Code:
[jguilbault@Wittgenstein ~]$ rsync --port=22022 -nva --delete jguilbault@myhost.dyndns.org:/home/jguilbault/media/photos /home/jguilbault/media/photos
ssh: connect to host myhost.dyndns.org port 22: Connection timed out
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: unexplained error (code 255) at io.c(453) [receiver=2.6.9]

You can see from this line that I clearly don't understand how to change the port properly:
Code:
ssh: connect to host myhost.dyndns.org port 22: Connection timed out
ssh is trying to connect on port 22.... grrrr...

Incidentally, I can ssh into the machine from this one with no problem, so everything's good except rsync :(.
 

Gilbo

Storage is cool
Joined
Aug 19, 2004
Messages
742
Location
Ottawa, ON
Grrr. GRSync doesn't have an easy option for changing the port.

I found this blog post which describes what I need to do, but he's doing it with the rsync daemon running. I was hoping to avoid setting up the daemon...
 

Gilbo

Storage is cool
Joined
Aug 19, 2004
Messages
742
Location
Ottawa, ON
I sorted it out.

-e 'ssh -p 22022'

That changes the shell. --port refers to the listening port of the rsync daemon, so it's only relevant if you're using the daemon, which I wasn't. Hence my trouble...
 
Top