rsync and tunneling via ssh
Jean-Gabriel Duquesnoy
duquesnoy at ifao.net
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 xxx.xxx.xxx.xxx: 2: fork failed: Resource temporarily
unavailable
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 internet2.edu]
Sent: Thursday, August 26, 2004 5:31 PM
To: Jean-Gabriel Duquesnoy
Cc: rsync at lists.samba.org
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
script,
> but
> ssh -i /home/user/bin/traveltest -f -C -L 2211:server.domain.net:8730
> rsync at localhost sleep 1000
You are sshing from localhost to localhost, and then trying to forward
localhost port 2211 to server.domain.net port 8730.
This means that the ssh server on localhost will try to send the
traffic to port 8730 on server.domain.net, which is presumably on the
other side of your firewall.
Probably what you want is:
ssh -i /home/user/bin/traveltest -f -C -L 2211:server.domain.net:8730
rsync at server.domain.net sleep 1000
Or maybe
ssh -i /home/user/bin/traveltest -f -C -L 2211:localhost:8730
rsync at srver.domain.net 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.
danno
--
dan pritts danno at internet2.edu
systems administrator 734/352-4953 office
internet2 734/834-7224 mobile
More information about the rsync
mailing list