Check by ssh issues

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
arnab.roy
Posts: 354
Joined: Sat Apr 30, 2011 10:24 am

Check by ssh issues

Post by arnab.roy »

Hi All,

I use check_by_ssh to monitor some of our devices to kick off remote scripts which then return exit codes to nagios. Since the remote device uses a login root we had to sudo the check command so that it ran as root after fudging around with the sudeoers file we got this working fine. The problem at times we keep getting this messages ssh_exchange_identification connection closed by remote host , my feeling is this happening because of something hitting session limit, but unfortunately their is nothing in between the XI server and the monitored linux box. So I am not sure where to look for , any help would be appreciated.

Many Thanks
Arnab
User avatar
arnab.roy
Posts: 354
Joined: Sat Apr 30, 2011 10:24 am

Re: Check by ssh issues

Post by arnab.roy »

Just to add I had to add has out #Defaults requiretty from the sudoers file to get the data back from the checks. Would this have any effect!
User avatar
arnab.roy
Posts: 354
Joined: Sat Apr 30, 2011 10:24 am

Re: Check by ssh issues

Post by arnab.roy »

The reason, for me to believe this is because when i run it from terminal there are no issues at all.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Check by ssh issues

Post by agriffin »

Does this Debian mailing list post help or apply to your network setup?
User avatar
arnab.roy
Posts: 354
Joined: Sat Apr 30, 2011 10:24 am

Re: Check by ssh issues

Post by arnab.roy »

I Thnks its related to the tty settings I put in the sudoers file any ideas what I can do if I don't hash require default tty I don't get the results of the check back
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Check by ssh issues

Post by agriffin »

I don't think it's related to requiretty. That option only specifies whether or not commands work remotely. So if you are able to run anything at all through ssh then requiretty is not the problem. Have you set the "PARANOID" option in either /etc/hosts.allow or /etc/hosts.deny?
User avatar
arnab.roy
Posts: 354
Joined: Sat Apr 30, 2011 10:24 am

Re: Check by ssh issues

Post by arnab.roy »

Hi ,

Are you talking about these options on the Nagios box or the Linux box we are monitoring ?

Many Thanks
Arnab
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Check by ssh issues

Post by nscott »

I believe he means on the remote machine that you're trying to check with ssh.
Nicholas Scott
Former Nagios employee
Locked