+# Spong module to check SSH availability without producing
+# an error in the server log
+# Author: Jan Willamowius, jan@willamowius.de, http://www.willamowius.de
+
# Register function with the plugin registry
$PLUGINS{'ssh'} = \&check_ssh;
# Check the ssh service with the built-in check_simple routine
sub check_ssh {
my ($host) = @_;
- return &check_simple( $host, 22, "", "^SSH", "ssh" );
+ my ( $color, $summary, $message ) = &check_simple( $host, 22, "SSH-1.99-spong_check_ssh_1.0\r\n", "^SSH", "ssh" );
+ $message =~ s/\n.*$//m;
+ return ( $color, $summary, $message );
}
1;