check_by_ssh from a different username
Matt Simmons
standalone.sysadmin at gmail.com
Tue Mar 9 15:46:13 CET 2010
Yes. And you can simplify this by running ssh-copy-id as the Nagios user:
--
nagios at monServ:~$ ssh-copy-id remUser at remHost
remUser at remHost's password:
Now try logging into the machine, with "ssh 'root at webdb1.int.ia'", and check in:
.ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
--
Most Linux systems that I've seen provide this script. Other Unices
may not have it. If it's there, it makes it much faster than manually
copying and pasting public keys.
--Matt
On Tue, Mar 9, 2010 at 8:23 AM, Marc Powell <marc at ena.com> wrote:
>
> On Mar 9, 2010, at 12:46 AM, Morris, Patrick wrote:
>
>>> How can I use check_by_ssh to monitor remote servers, when the
>>> username on the remote box is different from the Nagios user name?
>>
>> Install the private keys of the remote users on the Nagios machine under
>> the nagios user. You've already determined they work, so now copy them
>> over.
>
> Actually, it's the opposite. He needs to add the nagios user's public key to the authorized_keys file for each user on the remote machines.
>
> Moving private keys around is a security no-no.
>
> --
> Marc
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> 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
>
--
LITTLE GIRL: But which cookie will you eat FIRST?
COOKIE MONSTER: Me think you have misconception of cookie-eating process.
COOKIE MONSTER: Boy, I wish I were a sysadmin so I could go to the
NJ-PICC Sysadmin Conference! http://www.picconf.org
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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