[Nagiosplug-devel] Fwd: check_ssh modified
Stefan Fi
fis.stefan at googlemail.com
Tue Jan 26 15:38:58 CET 2010
Hello Nagios-Plugin-Team,
I modified check_ssh to verify the ssh-protocol version.
Attached you'll find the diff:
51d50
< char *remote_protocol = NULL;
61c60
< int ssh_connect (char *haddr, int hport, char *remote_version, char
*remote_protocol);
---
> int ssh_connect (char *haddr, int hport, char *remote_version);
86c85
< result = ssh_connect (server_name, port, remote_version,
remote_protocol);
---
> result = ssh_connect (server_name, port, remote_version);
112d110
< {"remote-protocol", required_argument, 0, 'P'},
125c123
< c = getopt_long (argc, argv, "+Vhv46t:r:H:p:P:", longopts,
&option);
---
> c = getopt_long (argc, argv, "+Vhv46t:r:H:p:", longopts,
&option);
166,169d163
< case
'P':
/* port */
< remote_protocol = optarg;
< break;
<
219c213
< ssh_connect (char *haddr, int hport, char *remote_version, char
*remote_protocol)
---
> ssh_connect (char *haddr, int hport, char *remote_version)
265,272d258
< if (remote_protocol && strcmp(remote_protocol, ssh_proto)) {
< printf
< (_("SSH WARNING - %s (protocol %s) protocol
mismatch, expected '%s'\n"),
< ssh_server, ssh_proto, remote_protocol);
< close(sd);
< exit (STATE_WARNING);
< }
<
329c315
< printf ("%s [-46] [-t <timeout>] [-r <remote version>] [-p <port>]
[-P <protcol>] <host>\n", progname);
---
> printf ("%s [-46] [-t <timeout>] [-r <remote version>] [-p <port>]
<host>\n", progname);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nagios-plugins.org/archive/devel/attachments/20100126/16bec510/attachment.html>
More information about the Devel
mailing list