rsync and tunneling via ssh

Jean-Gabriel Duquesnoy duquesnoy at
Thu Aug 26 15:48:42 GMT 2004

Hi Dan,

thanks for your hint, i am now one step further, I get the following error now:

Received disconnect from 2: fork failed: Resource temporarily

I suppose this is now happening on the second step of the script:

rsync -auz --password-file=rsync.pwd --delete
rsync://rsync@localhost:2211/cibimg /home/user/www/dir

Hope someone can help me find the error.

Best regards,

Jean-Gabriel Duquesnoy

-----Original Message-----
From: Dan Pritts [mailto:danno at]
Sent: Thursday, August 26, 2004 5:31 PM
To: Jean-Gabriel Duquesnoy
Cc: rsync at
Subject: Re: rsync and tunneling via ssh

On Thu, Aug 26, 2004 at 05:14:53PM +0200, Jean-Gabriel Duquesnoy wrote:
> Hi,
> I have setup a rsync server with a rsync running as a deamon, due to security
> rules I cannot open the rsync standard port (873) in the firewall.
> We have to tunnel rsync through ssh.
> On the client side, which is linux kernel 2.4 I have made the following
> but
> ssh -i /home/user/bin/traveltest -f -C -L
> rsync at localhost sleep 1000

You are sshing from localhost to localhost, and then trying to forward
localhost port 2211 to port 8730.

This means that the ssh server on localhost will try to send the
traffic to port 8730 on, which is presumably on the
other side of your firewall.

Probably what you want is:

 ssh -i /home/user/bin/traveltest -f -C -L
 rsync at sleep 1000

Or maybe

 ssh -i /home/user/bin/traveltest -f -C -L 2211:localhost:8730
rsync at sleep 1000

but it probably makes no difference.

You might (or might not) want to use the -N option to ssh instead
of using a "sleep 1000" command.

I also wonder why you're bothering with client/server mode - you might
as well just use plain old rsync over ssh.

dan pritts                                       danno at
systems administrator                            734/352-4953 office
internet2                                        734/834-7224 mobile

More information about the rsync mailing list