summaryrefslogtreecommitdiffstats
path: root/plugins/check_ssh.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/check_ssh.c')
-rw-r--r--plugins/check_ssh.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c
index 0f1c0835..b73cdf24 100644
--- a/plugins/check_ssh.c
+++ b/plugins/check_ssh.c
@@ -44,7 +44,6 @@ const char *email = "devel@monitoring-plugins.org";
44# define MSG_DONTWAIT 0 44# define MSG_DONTWAIT 0
45#endif 45#endif
46 46
47#define SSH_DFL_PORT 22
48#define BUFF_SZ 256 47#define BUFF_SZ 256
49 48
50static bool verbose = false; 49static bool verbose = false;
@@ -219,9 +218,7 @@ process_arguments_wrapper process_arguments(int argc, char **argv) {
219 result.errorcode = ERROR; 218 result.errorcode = ERROR;
220 return result; 219 return result;
221 } 220 }
222 if (result.config.port == -1) { /* funky, but allows -p to override stray integer in args */ 221
223 result.config.port = SSH_DFL_PORT;
224 }
225 return result; 222 return result;
226} 223}
227 224
@@ -398,7 +395,7 @@ int ssh_connect(mp_check *overall, char *haddr, int hport, char *desired_remote_
398 395
399void print_help(void) { 396void print_help(void) {
400 char *myport; 397 char *myport;
401 xasprintf(&myport, "%d", SSH_DFL_PORT); 398 xasprintf(&myport, "%d", default_ssh_port);
402 399
403 print_revision(progname, NP_VERSION); 400 print_revision(progname, NP_VERSION);
404 401