rsync over ssh

Dave Gawlik ddave at ddave.com
Wed Apr 30 10:24:12 EST 2003


On Tue, 29 Apr 2003, Wayne Davison wrote:

> On Tue, Apr 29, 2003 at 11:49:07AM -0700, Dave Gawlik wrote:
> > WARNING: --rsh or -e option ignored when connecting to rsync daemon
> 
> This is the error message that older rsync programs would output if you
> tried to combine -e with host::module syntax, so you must be running an
> older rsync from cron (perhaps due to a different PATH setting).

Duh!!!

whereis rsync
rsync: /usr/bin/rsync /usr/local/bin/rsync

I did a new install of v.2.5.6 and and it chose /usr/local/bin/rsync. 
Everything from the command line went with the new install. But, I had 
v.2.5.5 lurking in /usr/bin/rsync from the original RedHat v.8.0 install 
and that's what the user cron went with...


> A more modern rsync will take the combination of the 2 and use ssh to
> start up a single-session daemon that only serves the other end of the
> ssh connection -- i.e. it does not allow you to contact an
> already-running daemon on the remote side.  So, this command:
> 
> > rsync "--rsh=/usr/bin/ssh -L 23:$REMOTE:23" \
> > -azR --verbose --progress --stats --force --bwlimit=64 \
> > $REMOTE::$MODULE $SYNCTO
> 
> Is probably not be doing what you think -- it is using ssh to run its
> own daemon process, and while that it running the telnet port is being
> redirected between the two systems (which has no effect on rsync).
> 
> One way to run this would be for the user to log into the daemon server,
> and then run ssh with port-forwarding in reverse.  For instance, if you
> wanted to run "rsync $SERVER::$MODULE $SYNCTO" (where $SYNCTO is on
> $CLIENT), log into the $SERVER machine, and then run this command:
> 
> ssh -R8873:localhost:873 $CLIENT rsync rsync://localhost:8873/$MODULE $SYNCTO
> 
> This makes ssh keep the connection open for as long as rsync needs it
> because rsync is being run by ssh.  (And forwarding port 8873 on the
> $CLIENT side instead of 873 means that you don't need to be root.)
> 
> Other solutions are also possible, such as running a background ssh with
> port forwarding, running rsync, and then killing the ssh (all from the
> client side).

Your formula works like a charm! Thanks for your help!

-- 
Regards,

*Dangerous* Dave Gawlik
LServ.Com WebMaster/Administrator
Join www.cauce.org and Ban spam on the Internet



More information about the rsync mailing list