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/ifao/bin/traveltest -f -C -L 2211:cib.ifao.net:8730 cytric@localhost sleep 1000 rsync -auz --password-file=rsync.cib --delete rsync://rsync@localhost:2211/cibimg /home/ifao/www/cib2 But when running it, I get the following message: channel 2: open failed: connect failed: Connection refused What have I done wrong? I already have gone through much of the mailing list, gathering information from the previous postings, but nothing could solve this problem up to now. Anybody having an idea what might be wrong or needs to be done differently? Thanks in advance, Jean-Gabriel Duquesnoy
On Thu 26 Aug 2004, Jean-Gabriel Duquesnoy wrote:> > 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/ifao/bin/traveltest -f -C -L 2211:cib.ifao.net:8730 > cytric@localhost sleep 1000 > rsync -auz --password-file=rsync.cib --delete > rsync://rsync@localhost:2211/cibimg /home/ifao/www/cib2Please post this again, now with word wrapping switched off because this is pretty unclear.... Also, you're connecting with ssh to localhost?! What's the point of the tunnel then? I expect you want something more like: ssh -i /home/ifao/bin/traveltest -f -C -L 2211:localhost:8730 cytric@cib.ifao.net Paul Slootman
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/ifao/bin/traveltest -f -C -L 2211:cib.ifao.net:8730 > cytric@localhost sleep 1000You are sshing from localhost to localhost, and then trying to forward localhost port 2211 to cib.ifao.net port 8730. This means that the ssh server on localhost will try to send the traffic to port 8730 on cib.ifao.net, which is presumably on the other side of your firewall. Probably what you want is: ssh -i /home/ifao/bin/traveltest -f -C -L 2211:cib.ifao.net:8730 cytric@cib.ifao.net sleep 1000 Or maybe ssh -i /home/ifao/bin/traveltest -f -C -L 2211:localhost:8730 cytric@cib.ifao.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@internet2.edu systems administrator 734/352-4953 office internet2 734/834-7224 mobile