Page 1 of 1

Check by ssh issues

Posted: Wed Sep 14, 2011 8:36 am
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

Re: Check by ssh issues

Posted: Wed Sep 14, 2011 8:49 am
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!

Re: Check by ssh issues

Posted: Wed Sep 14, 2011 8:51 am
by arnab.roy
The reason, for me to believe this is because when i run it from terminal there are no issues at all.

Re: Check by ssh issues

Posted: Wed Sep 14, 2011 10:55 am
by agriffin
Does this Debian mailing list post help or apply to your network setup?

Re: Check by ssh issues

Posted: Wed Sep 14, 2011 4:28 pm
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

Re: Check by ssh issues

Posted: Wed Sep 21, 2011 11:48 am
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?

Re: Check by ssh issues

Posted: Tue Oct 18, 2011 9:44 am
by arnab.roy
Hi ,

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

Many Thanks
Arnab

Re: Check by ssh issues

Posted: Tue Oct 18, 2011 10:49 am
by nscott
I believe he means on the remote machine that you're trying to check with ssh.