automating commands on nodes
Peter Jay Salzman
covenant at dirac.org
Sun Jun 4 17:11:58 PDT 2000
we have ssh on the beowulf frontend, but not on the nodes. any ideas on
automating installing ssh on the nodes? i haven't seen redhat 6.1 ssh rpms,
i guess that's a remnant of the USA's moronic crypto export policy (which i
understand was mostly lifted).
i've tried to use mandrake's ssh packages on a redhat 6.1, but redhat balked
at the mandrake rpms.
btw, i didn't know ssh had the capability to run stuff non-interactively.
that is a very cool thing to know! thank you very much!
> Date: Mon, 5 Jun 2000 01:23:44 +0200
> From: "[iso-8859-1] Jakob Østergaard" <jakob at ostenfeld.dk>
> To: Peter Jay Salzman <covenant at dirac.org>
> Cc: Beowulf Mailing List <beowulf at beowulf.org>
> Subject: Re: automating commands on nodes
> On Sun, 04 Jun 2000, Peter Jay Salzman wrote:
> > dear all,
> > i'd like to:
> > edit /etc/profile to include /sbin and /usr/sbin in PATH
> > adduser jobrun
> > on our 40 nodes. is there a way of doing this without telnetting 40 times?
> If you haven't already, you should setup SSH on all the nodes. Then you can
> put your public key in ~root/.ssh/authorized_keys to allow instant login from
> anywhere provided your passphrase is entered correctly at your workstation.
> If you don't know about SSH, Secure Shell, you should read about it (good
> pointers anyone ?)
> Once you've done that, it should be a simple matter to do what you asked:
> Provided the names of all your hosts are in the file /etc/hostfile:
> [start up a shell under ssh-agent, type in passphrase to ssh-add]
> for i in `cat /etc/hostfile`; do
> ssh -l root $i perl -pi -e 's/(PATH=\"[^"]+)\"/$1:\/usr\/sbin:\/sbin\"/' /etc/profile
> ssh -l root $i adduser jobrun
> You might want to experiment with copies of /etc/profile when doing tricks
> like that.... This time I actually managed to get it right at first shot,
> but your mileage might vary ;)
More information about the Beowulf