Re: [Nagios-users] Problems checking external host

2009-12-13 Thread Juki
2009/12/12 ReynierPM rper...@uci.cu > I just have a little problem here. How can I became "nagios" if I login > as "root"? I mean after login as "root" I get a "root" shell, how I can > became "nagios" from this point? > Do; # su - nagios

Re: [Nagios-users] Problems checking external host

2009-12-12 Thread Jim McNamara
On Sat, 2009-12-12 at 10:10 -0500, ReynierPM wrote: > James Pratt wrote: > > > > http://www.zdnetasia.com/techguide/opensource/0,39044899,62052006,00.htm > > some > > create > > > > No problem - As root, just run: > > > > su - nagios -c "ssh nag...@remotebox.com" (replace your target hostname >

Re: [Nagios-users] Problems checking external host

2009-12-12 Thread ReynierPM
Jim McNamara wrote: Thanks for your fast reply Jim and it's a great entry I understood all and now know why my config doesn't work. > Nagios runs as user nagios (usually), not as root, so that is the > beginning of the problem. It is also possible that the remote host > doesn't accept key based a

Re: [Nagios-users] Problems checking external host

2009-12-12 Thread ReynierPM
James Pratt wrote: > > http://www.zdnetasia.com/techguide/opensource/0,39044899,62052006,00.htm > some > create > > No problem - As root, just run: > > su - nagios -c "ssh nag...@remotebox.com" (replace your target hostname > here, or use IP) > > let it connect and accept the key, then do the s

Re: [Nagios-users] Problems checking external host

2009-11-19 Thread ReynierPM
James Pratt wrote: > su - nagios -c "ssh nag...@remotebox.com" (replace your target > hostname here, or use IP) > > let it connect and accept the key, then do the same on the target box > in reverse, so that both sides have the key in ~/.ssh/authorized_keys > files. Ok I run the command and I g

Re: [Nagios-users] Problems checking external host

2009-11-16 Thread James Pratt
>> -Original Message- >> From: ReynierPM [mailto:rper...@uci.cu] >> Sent: Monday, November 16, 2009 10:04 AM >> To: James Pratt >> Cc: nagios-users@lists.sourceforge.net >> Subject: Re: [Nagios-users] Problems checking external host >> >>

Re: [Nagios-users] Problems checking external host

2009-11-16 Thread ReynierPM
James Pratt wrote: > > Here's a tutorial I found on setting this up - > > http://www.zdnetasia.com/techguide/opensource/0,39044899,62052006,00.htm > Thanks for the tutorial it really help me a lot but I need to ask some dummie or newbie :( question: if I'm logged in as root, how I can create

Re: [Nagios-users] Problems checking external host

2009-11-16 Thread James Pratt
>> -Original Message- >> From: ReynierPM [mailto:rper...@uci.cu] >> Sent: Monday, November 16, 2009 9:45 AM >> To: Morris, Patrick >> Cc: nagios-users@lists.sourceforge.net >> Subject: Re: [Nagios-users] Problems checking external host >> &

Re: [Nagios-users] Problems checking external host

2009-11-16 Thread ReynierPM
Morris, Patrick wrote: > The part I'm fairly sure you're missing is that the name in > authorized_keys must match the name or address Nagios uses, exactly. > That's really the only reason you'd see that error. Hi Patrick: What you mean with address nagios use? You mean the users configured on c

Re: [Nagios-users] Problems checking external host

2009-11-12 Thread Morris, Patrick
ReynierPM wrote: > Morris, Patrick wrote: > >> ReynierPM wrote: >> >> check_by_ssh does host key checking, and if one does not exist or it >> does not match what's in Nagios's known_hosts file, it will fail. >> >> The easy fix would be to SSH from the Nagios box to each of those hosts >> manua

Re: [Nagios-users] Problems checking external host

2009-11-12 Thread ReynierPM
Morris, Patrick wrote: > ReynierPM wrote: > > check_by_ssh does host key checking, and if one does not exist or it > does not match what's in Nagios's known_hosts file, it will fail. > > The easy fix would be to SSH from the Nagios box to each of those hosts > manually as the Nagios user, using

Re: [Nagios-users] Problems checking external host

2009-11-11 Thread Morris, Patrick
ReynierPM wrote: > Hi every: > I'm trying to check a external server using check_by_ssh command but I'm > getting this errors: > 1. Remote command execution failed: Host key verification failed. > 2. (Return code of 127 is out of bounds - plugin may be missing) > > [snip] > > Why it fails? > Cheers

Re: [Nagios-users] Problems checking external host

2009-11-11 Thread James Pratt
>> -Original Message- >> From: ReynierPM [mailto:rper...@uci.cu] >> Sent: Tuesday, November 10, 2009 11:32 PM >> To: nagios-users@lists.sourceforge.net >> Subject: [Nagios-users] Problems checking external host >> >> Hi every: >> I'm trying to check a external server using check_by_ssh c