<br><div class="gmail_quote">Hello Nagios-Plugin-Team,<br><br>I modified check_ssh to verify the ssh-protocol version.<br><br>Attached you'll find the diff:<br><br>51d50<br>< char *remote_protocol = NULL;<br>61c60<br>
< int ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol);<br>
---<br>> int ssh_connect (char *haddr, int hport, char *remote_version);<br>86c85<br>< result = ssh_connect (server_name, port, remote_version, remote_protocol);<br>---<br>> result = ssh_connect (server_name, port, remote_version);<br>
112d110<br>< {"remote-protocol", required_argument, 0, 'P'},<br>125c123<br>< c = getopt_long (argc, argv, "+Vhv46t:r:H:p:P:", longopts, &option);<br>---<br>
> c = getopt_long (argc, argv, "+Vhv46t:r:H:p:", longopts, &option);<br>166,169d163<br>< case 'P': /* port */<br>
< remote_protocol = optarg;<br>< break;<br><<br>219c213<br>< ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol)<br>---<br>> ssh_connect (char *haddr, int hport, char *remote_version)<br>
265,272d258<br>< if (remote_protocol && strcmp(remote_protocol, ssh_proto)) {<br>< printf<br>< (_("SSH WARNING - %s (protocol %s) protocol mismatch, expected '%s'\n"),<br>
< ssh_server, ssh_proto, remote_protocol);<br>< close(sd);<br>< exit (STATE_WARNING);<br>< }<br><<br>329c315<br>< printf ("%s [-46] [-t <timeout>] [-r <remote version>] [-p <port>] [-P <protcol>] <host>\n", progname);<br>
---<br>> printf ("%s [-46] [-t <timeout>] [-r <remote version>] [-p <port>] <host>\n", progname);<br><br>
</div><br>