mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-03-23 19:03:04 -04:00
check_ssh: Get rid of sshd: Read from socket failed: Connection reset by peer
This fix was grabbed from FreeBSD downstream and provided by Dmitry Sivachenko. Fixes Debian Bug #734811
This commit is contained in:
parent
d8354ec15d
commit
a387120182
1 changed files with 2 additions and 0 deletions
|
|
@ -250,6 +250,7 @@ ssh_connect (char *haddr, int hport, char *remote_version)
|
|||
printf
|
||||
(_("SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n"),
|
||||
ssh_server, ssh_proto, remote_version);
|
||||
recv (sd, output, BUFF_SZ, 0);
|
||||
close(sd);
|
||||
exit (STATE_WARNING);
|
||||
}
|
||||
|
|
@ -260,6 +261,7 @@ ssh_connect (char *haddr, int hport, char *remote_version)
|
|||
(_("SSH OK - %s (protocol %s) | %s\n"),
|
||||
ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s",
|
||||
FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout));
|
||||
recv (sd, output, BUFF_SZ, 0);
|
||||
close(sd);
|
||||
exit (STATE_OK);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue