Connection to rsyncd over ssh tunnel seems to choke up (v2.6.9 Ubuntu)

Wayne Davison wayned at samba.org
Tue Apr 26 15:31:36 MDT 2011


On Tue, Apr 26, 2011 at 7:00 AM, Frank Hamersley <terabite at bigpond.com> wrote:
> rsync -aP -vv --exclude=".*/" -e 'ssh -fN user at site.com.au -L
> 8873:127.0.0.1:873' rsync://localhost:8873/data/ /data/

The combination of daemon syntax and a remote shell tells rsync to
connect to use the remote-shell command to run a single-use daemon,
which it talks to over stdin/stdout.  No ports are applicable in such
a scenario, so no forwarding is needed.  The -N option stops the
command args from doing anything useful, so the local rsync isn't able
to talk to the remote rsync on stdin/stdout (it just hangs waiting for
some remote data).

If you want to use a single-use daemon, put a rsyncd.conf file into
the remote user's home directory and just combine -e ssh with
rsync://user@site.com.au/data/.  If you want to connect to an existing
remote daemon service, you'll need to run the port-forwarding ssh
command separately and kill it when rsync finishes (or leave it
running, and add some start-it-up-if-it-isn't-running code).

..wayne..


More information about the rsync mailing list