Hello,

There is a small tool for this. "sshpass"
http://sourceforge.net/projects/sshpass/

#!/bin/bash
for i in `cat server.list`
do
 sshpass -p passw0rd ssh [EMAIL PROTECTED] sudo faillog
done

Regards,
Jae-hwa

2007/7/13, Michael MacIsaac <[EMAIL PROTECTED]>:
Hello list,

Does anyone have a simple wrapper around SSH to run the same command on
multiple Linuxes?

If I have key-based authentication set up from one server to another
server, call it "linux01", I can issue the command:
 # ssh linux01 ls /root
 bin
and see the output from linux01 without needing a password.

But let's say I'd like to issue that command on 5 different linuxes.  I
could call the command dssh and define a group "linuxes" that consist of
linux01-linux05.  Then I could issue the command:
 # dssh linuxes ls /root
 linux01:
 bin
 linux02:
 bin
 linux03:
 bin
 linux04:
 bin
 linux05:
 bin
and see the output from each member in the group.

I thought about cobbling together a script, but certainly this has been
written.  Maybe there's already an RPM in my distro that just has to be
installed.

Thanks.

"Mike MacIsaac" <[EMAIL PROTECTED]>   (845) 433-7061

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390



--
Jae-hwa Park <[EMAIL PROTECTED]>
THE CHALLENGES, that's why I choose LINUX!!!
For more information on me, visit http://php.sarang.net

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to