diff options
Diffstat (limited to 'plugins/check_ssh.c')
-rw-r--r-- | plugins/check_ssh.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 6e8a5fc5..5c75d278 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c | |||
@@ -1,9 +1,9 @@ | |||
1 | /***************************************************************************** | 1 | /***************************************************************************** |
2 | * | 2 | * |
3 | * Nagios check_ssh plugin | 3 | * Monitoring check_ssh plugin |
4 | * | 4 | * |
5 | * License: GPL | 5 | * License: GPL |
6 | * Copyright (c) 2000-2007 Nagios Plugins Development Team | 6 | * Copyright (c) 2000-2007 Monitoring Plugins Development Team |
7 | * | 7 | * |
8 | * Description: | 8 | * Description: |
9 | * | 9 | * |
@@ -30,7 +30,7 @@ | |||
30 | 30 | ||
31 | const char *progname = "check_ssh"; | 31 | const char *progname = "check_ssh"; |
32 | const char *copyright = "2000-2007"; | 32 | const char *copyright = "2000-2007"; |
33 | const char *email = "nagiosplug-devel@lists.sourceforge.net"; | 33 | const char *email = "devel@monitoring-plugins.org"; |
34 | 34 | ||
35 | #include "common.h" | 35 | #include "common.h" |
36 | #include "netutils.h" | 36 | #include "netutils.h" |
@@ -250,6 +250,7 @@ ssh_connect (char *haddr, int hport, char *remote_version) | |||
250 | printf | 250 | printf |
251 | (_("SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n"), | 251 | (_("SSH WARNING - %s (protocol %s) version mismatch, expected '%s'\n"), |
252 | ssh_server, ssh_proto, remote_version); | 252 | ssh_server, ssh_proto, remote_version); |
253 | recv (sd, output, BUFF_SZ, 0); | ||
253 | close(sd); | 254 | close(sd); |
254 | exit (STATE_WARNING); | 255 | exit (STATE_WARNING); |
255 | } | 256 | } |
@@ -260,6 +261,7 @@ ssh_connect (char *haddr, int hport, char *remote_version) | |||
260 | (_("SSH OK - %s (protocol %s) | %s\n"), | 261 | (_("SSH OK - %s (protocol %s) | %s\n"), |
261 | ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", | 262 | ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", |
262 | FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout)); | 263 | FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout)); |
264 | recv (sd, output, BUFF_SZ, 0); | ||
263 | close(sd); | 265 | close(sd); |
264 | exit (STATE_OK); | 266 | exit (STATE_OK); |
265 | } | 267 | } |
@@ -291,7 +293,7 @@ print_help (void) | |||
291 | 293 | ||
292 | printf (UT_IPv46); | 294 | printf (UT_IPv46); |
293 | 295 | ||
294 | printf (UT_TIMEOUT, DEFAULT_SOCKET_TIMEOUT); | 296 | printf (UT_CONN_TIMEOUT, DEFAULT_SOCKET_TIMEOUT); |
295 | 297 | ||
296 | printf (" %s\n", "-r, --remote-version=STRING"); | 298 | printf (" %s\n", "-r, --remote-version=STRING"); |
297 | printf (" %s\n", _("Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)")); | 299 | printf (" %s\n", _("Warn if string doesn't match expected server version (ex: OpenSSH_3.9p1)")); |