SSH and rsync server

Wayne Davison wayned at
Tue Aug 17 17:25:15 GMT 2004

On Tue, Aug 17, 2004 at 06:15:41PM +0200, Lars E. D. Jensen wrote:
> The warning tells me that it's not possibel to use ssh?!

Not to connect with an existing rsync daemon.  The remote-shell option
tells rsync to spawn a remote-shell which runs a program (rsync).
However, to connect to an existing rsync daemon, rsync just needs to
open a socket connection, which is something different.

In a modern rsync (e.g. 2.6.2), combining --rsh (-e) with the daemon
syntax ("::") no longer warns, but instead results in a remote-shell
spawning of a brand new daemon process on the remote system (which some
people want to do, but still does not let you connect to an existing
rsync daemon).

So, if you want to encrypt the traffic to an existing rsync daemon,
you'll need to use ssh (or maybe stunnel) to forward a local socket
address to the remote machine (which allows you to tell rsync to connect
to the local machine and have that connection get forwarded to the
remote machine via the secure tunnel) -- see the ssh docs for how to use
ssh to do that.  Alternately, you can use a more modern rsync to run a
remote daemon command over ssh (which lets you use the module syntax for
the transfer, but does not let you connect to an existing daemon that
has elevated privileges compared to your login).


More information about the rsync mailing list