HowTo check_by_ssh ?

Carroll, Jim P [Contractor] jcarro10 at sprintspectrum.com
Thu Nov 14 19:13:48 CET 2002


I think the command is ssh-keygen, not ssh-keyget.

Also, it's entirely an admin decision whether to use dsa, rsa1 or rsa2.
Florian should check out the manpage for ssh-keygen for details.  I
personally prefer rsa2.  The command would then be "ssh-keygen -t rsa".  The
equivalents to id_dsa/id_dsa.pub would then be id_rsa/id_rsa.pub.  The rest
of the implementation is essentially the same.

jc

> -----Original Message-----
> From: Demetri Mouratis [mailto:dmourati at cm.math.uiuc.edu]
> Sent: Thursday, November 14, 2002 10:21 AM
> To: Florian Schie?l
> Cc: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] HowTo check_by_ssh ?
> 
> 
> 
> On Thu, 14 Nov 2002, Florian Schie?l wrote:
> 
> > Hi all !
> >
> > I'm trying to check local_load und local_user on a remote 
> machine using
> > check_by_ssh.
> >
> > But all my tries didn't succeed. I looked for Docs but 
> can't find some
> > :-(
> >
> > Can someone give me a step-by-step HowTo to implement these feature?
> >
> > Nagios is running on one machine, on the other are only the plugins
> > installed.
> >
> >
> > Would be very nice ;-)
> >
> > Thx
> >
> > Florian
> 
> The first thing you need to do is install all the plugins you want to
> check on your remote hosts.  I normally copy 
> /usr/local/nagios/libexec to
> /home/nagios/bin.
> 
> Next, you need to setup passwordless authentication.  You generate a
> keypair with ssh-keyget -t dsa on your nagios box as the 
> nagios user.  You
> can either use a null passphrase or use a real passphrase and use a
> utility like keychain to have a persistent ssh-agent session 
> running for
> nagios.
> 
> After you generate your key, copy the id_dsa.pub file from
> /home/nagios/.ssh/ over to /home/nagios/.ssh/authorized_keys2 on your
> remote hosts.  You should now be able to give the following 
> command and
> login from the nagios box to your remote host without a password:
> 
> nagios at nagios$ ssh -l nagios remotehost
> 
> Now all you need to do is setup check_by_ssh commands in your
> services.cfg and checkcommands.cfg.
> 
> Here's a line from my services.cfg:
> check_command                   check_remote_load!5,5,5!10,10,10
> 
> and the corresponding line in checkcommands.cfg:
> command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -l 
> nagios -i $USER5$
> -C "$USER6$/check_load -w $ARG1$ -c $ARG2$"
> 
> I've defined $USER5$ as /home/nagioas/.ssh/id_dsa and $USER6$ as
> /home/nagios/bin in resource.cfg.
> 
> Hope that helps.
> 
> ---------------------------------------------------------------------
> Demetri Mouratis
> dmourati at linfactory.com
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by: To learn the basics of securing 
> your web site with SSL, click here to get a FREE TRIAL of a Thawte 
> Server Certificate: http://www.gothawte.com/rd524.html
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> 


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html




More information about the Users mailing list