mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
Get rid of sshd: Read from socket failed: Connection reset by peer [preauth]
in server logs when using check_ssh.
This commit is contained in:
parent
60842bc029
commit
3c48668c58
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=328283
2 changed files with 19 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= nagios-plugins
|
||||
PORTVERSION= 1.4.16
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= net-mgmt
|
||||
MASTER_SITES= SF/nagiosplug/nagiosplug/${PORTVERSION}
|
||||
|
|
18
net-mgmt/nagios-plugins/files/patch-plugins-check_ssh.c
Normal file
18
net-mgmt/nagios-plugins/files/patch-plugins-check_ssh.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
--- plugins/check_ssh.c.orig 2012-06-27 21:32:47.000000000 +0400
|
||||
+++ plugins/check_ssh.c 2013-09-25 17:03:01.000000000 +0400
|
||||
@@ -250,6 +250,7 @@ ssh_connect (char *haddr, int hport, cha
|
||||
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, cha
|
||||
(_("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…
Add table
Reference in a new issue