From 586a3e886a87f6dfc1eb8a5329141cb1ef5c194b Mon Sep 17 00:00:00 2001 From: Jan Willamowius Date: Tue, 13 Sep 2005 12:12:51 +0000 Subject: [PATCH] send identification string to avoid error in server log --- src/lib/Spong/Network/plugins/check_ssh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/Spong/Network/plugins/check_ssh b/src/lib/Spong/Network/plugins/check_ssh index 19b23a1..9b3aacc 100755 --- a/src/lib/Spong/Network/plugins/check_ssh +++ b/src/lib/Spong/Network/plugins/check_ssh @@ -1,10 +1,16 @@ +# 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; -- 2.30.2