RSync + SSH tunneling through firewall

Andrzej Filip anfi at
Wed Sep 8 09:43:22 GMT 2004

Stefaan Lhermitte wrote:
>   I tried to connect the tunnel with another port number. When I use 
> port number 22 instead of 873 I can telnet to C from B.
> When I telnet I get  "SSH-1.99-OpenSSH_3.9p1."
> Subsequently I ran: ssh -v -L 22:C-computer:22 myname at B-computer
> When I run now the rsync command:
> rsync -v /cygdrive/d/folder/
> I get the error: "failed to connect to Connection refused."
> When I run:
> rsync -v --port=22 /cygdrive/d/folder/
> I get the error "server sent SSH-1.99-OpenSSH_3.9p1 rather than greeting"
> I assume it is a problem associated with the telnet command. Can anyone 
> help?

As I understand:
* you want to start rsync session A->C
* you can not establish ssh session A->C (firewall)
* you can establish ssh session A->B and B->C

Try to use "extra ssh hop" script:

1) Create ssh-b script on host A:
exec ssh _host_B_ ssh "$@"

2) Use the above sctipt in rsync session
rsync -e ./ssh-b ....

Andrzej [en:Andrew] Adam Filip anfi at anfi at
Home Page [ PageRank 6 ]

More information about the rsync mailing list