check_ssh: Client says "Read from socket failed: Connec

Hello everyone,

I am checking most of my Unix systems using the ‘check_ssh’ check. It seems that check_ssh initiates an SSH session to the client, and then simply drops the connection.

As a result, the following critical error appears in my system logfiles (At /var/adm/messages, /var/log/messages, or /var/log/auth.log).

Dec 10 21:51:12 devdb2 sshd[3641]: [ID 800047 auth.crit] fatal: Read from socket failed: Connection reset by peer
Dec 10 22:11:21 devdb2 sshd[5703]: [ID 800047 auth.crit] fatal: Read from socket failed: Connection reset by peer
Dec 10 22:26:14 devdb2 sshd[7173]: [ID 800047 auth.crit] fatal: Read from socket failed: Connection reset by peer

Is there a way to configure the check_ssh check to behave better? ‘auth.crit’ is a pretty important log facility, and I don’t want to clutter it with noisy messages regarding Nagios SSH checks.

I appreciate any help, thank you!

-= Stefan

Run the command and paste the output, plus the command you ran.

I am unable to replicate this error every time. It only seems to happen less then 30% of the time.

I ran the following command:

$ ./check_ssh -H snap1 && date
SSH OK - OpenSSH_3.7.1p2 (protocol 1.99)
Wed Dec 20 13:36:01 PST 2006

In the corresponding client logfile, I see the following error:

Dec 20	  	13:36:01	sshd[8911]	fatal: Read from socket failed: Connection reset by peer

Any word on how to fix this problem?

We get simialr error messages plus and additional one:

[code]
./check_ssh dvapp1ugc && date && tail /var/log/secure

SSH OK - OpenSSH_4.3 (protocol 2.0)
Fri Oct 10 13:57:29 EDT 2008

Oct 10 13:56:48 dvapp1ugc sshd[22462]: fatal: Read from socket failed: Connection reset by peer
Oct 10 13:57:29 dvapp1ugc sshd[22771]: Connection closed by UNKNOWN[/code]

EDIT: I am using version 1.4.12 of the plugins.