Subject: Re: rdist and ssh
To: Patrick Welche <prlw1@newn.cam.ac.uk>
From: Malcolm Herbert <mjch@mjch.net>
List: netbsd-users
Date: 07/08/2002 12:59:07
On Sun, Jul 07, 2002 at 06:37:44PM +0100, Patrick Welche wrote:
|I don't want to discard rsh! I just don't understand why using ssh
|instead should cause the two rdist processes from talking to each
|other!

I'm using the rdist6 package and ssh quite happily. rdist6 will
correctly use ssh when you supply the -P option[1]. it does tend to
choke if the dialog with ssh is non-standard (eg, because you haven't
collected a server key from the other machine yet) but otherwise it
works fine. I don't use the environment variable you mention, although I
will look at it ...

I'd echo the other comments regarding rdist vs rsync. To do what rdist
does natively you would have to use something like make and rsync and
supply your own glue in the middle ... rdist has a large similarity with
make (in that you can make quite complex rulesets/recipes) even if it
isn't as efficient as rsync at file copy over a slow link, so it's a
lot more flexible[2].

More importantly, rdist is able to execute commands for you on the
target machine when files are updated - very useful to HUP a process if
its config file changes, for example. If you were using rsync then you'd
need to make another ssh connection after the file copy in order to HUP
the process (afaik - I haven't used rsync) - rdist does it in one.

Also, if you want to force an update of a particular host (where you
might have several different files under rdist control in seperate
recipes), you can simply tell it to update the machine - it will work
out which recipes are pertinent, then do the lot with one connection.

Hope that helps,
Malcolm

[1] rdist6 can be used as the server only, so it will talk to an older
rdist client quite happily. rdist6 makes the ssh connection then merely
runs whatever rdist client it finds at the other end, so you don't have
to update both machines if you don't want to (although there are some
protocol extensions that an older client won't see, but I haven't had
any problems so far)

[2] Presumably the rsync algorithm could be embedded into rdist for file
copy, then there would be no reason to use rsync ... :)

-- 
Malcolm Herbert                                This brain intentionally
mjch@mjch.net                                                left blank