SSH key: '/root/.ssh/id_rsa' Error

vivek sharma sharma vivek_222 at rediffmail.com
Mon Apr 4 15:52:44 CEST 2005


Dear Marc,
          Well yeh i sorted out the same on the hint given by you .Basically i am running nagios as root only but i to enable nagios to check remote services i have to enable "nagios" user login to remote hosts and ofcourse without passwd as i am using push_check.sh.

So i created the keys as nagios user in nagios host  ans then copied the public keys to the remote user's root's home and it started working.

Thanks.
vivek.


On Mon, 04 Apr 2005 Marc Powell wrote :
>
>
> > -----Original Message-----
> > From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> > admin at lists.sourceforge.net] On Behalf Of vivek sharma sharma
> > Sent: Sunday, April 03, 2005 3:23 PM
> > To: Arno Lehmann
> > Cc: nagios-users at lists.sourceforge.net
> > Subject: [Nagios-users] SSH key: '/root/.ssh/id_rsa' Error
> >
>
>
> > For My second phase of Nagios Implementation:
> >
> > I have configured push_check.sh to run plugins on remote machines::
> > For this I have enabled ssh without passwd using RSA.
> >
> > Now my command is:
> > define command {
> >                 command_name remote_procs_check
> >                 command_line $USER1$/push_check.sh /root/.ssh/id_rsa
> > XXX.XXX.XXX
> > $USER1$/check_procs -w 2:2 -c 2:1024 -C flowd
> >                 }
> >
> > This command when run from command line gives proper output::
> > [root at nagios libexec]# ./push_check.sh /root/.ssh/id_rsa XXX.XXX.XXX
> > ./check_procs
> > -w 1:2 -c 1:1024 -C flowd
> >
> > PROCS OK: 2 processes with command name 'flowd'
>
>This looks to be run as the root user. Have you tried running it as the
>nagios user?
>
> >
> > But when I see in Nagios GUI it gives the following error:
> > ERROR: SSH key: '/root/.ssh/id_rsa' does not exist
> >
> > I have placed the /root/.ssh/id_rsa.pub keys in the
> > /root/.ssh/authorized_keys in the
> > XXX.XXX.XXX host
> >
> > What may be causing this?
>
>You're not running nagios as root, are you? That would probably be a bad
>idea. If not, it's highly unlikely that the nagios user can access
>_anything_ under /root. If it can, that's bad as well. Generate a key as
>the nagios user, add it to authorized_keys for the user you want to be
>on the remote machine, try the command from your nagios machine as the
>nagios user to accept the host identification (only needed once) and to
>verify that the command runs as you expect.
>
> > Also what is the difference between running it through nagios and
>running
> > it through command
> > line as root.
>
>Nagios user != root user. Root has global permissions to everything on
>the file system, the nagios user doesn't (or shouldn't).
>
>--
>Marc
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://ads.osdn.com/?ad_ide95&alloc_id396&opick
>_______________________________________________
>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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20050404/75816dbe/attachment.html>


More information about the Users mailing list