check by ssh

C. Bensend benny at bennyvision.com
Mon Mar 22 02:33:27 CET 2004


> I would like to use check_by_ssh to gather information from a remote ssh
> unix server. I know how to generate keys using ssh-keygen and applying the
> pub file to the remote. However, I don't like doing this over and over
> again
> for 100 different unix servers. Is there a way for us to use check_by_ssh
> plugin where in we can supply the username and password on the command
> line?

No such beast, and I'm kind of happy about that.

I think you're looking at the wrong idea - you don't have to run ssh-keygen
on the client machines you're testing, you only need to make sure the nagios
user's public key is distributed.

SURELY with 100 different UNIX servers you have tools to automatically
push files / config changes...  Use those tools to push a copy of
authorized_keys2 to all the client machines, and yay, you're done.

Hell something like this should work in a pinch (not tested, but should
be a piece of cake to fix if it doesn't work):

for foo in `cat server-list`; do
   scp authorized_keys2 nagios@$foo:.ssh/
   ssh nagios@$foo chmod 0600 .ssh/authorized_keys2
done

Benny


-- 
"Ohhh, it's like I'm walking on a pile of baby ducks!"
                              -- Red, "That 70's Show"


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list