summaryrefslogtreecommitdiff
path: root/lib/custodian/protocol-tests/ssh.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian/protocol-tests/ssh.rb')
-rwxr-xr-xlib/custodian/protocol-tests/ssh.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/custodian/protocol-tests/ssh.rb b/lib/custodian/protocol-tests/ssh.rb
index 801a381..4ee9974 100755
--- a/lib/custodian/protocol-tests/ssh.rb
+++ b/lib/custodian/protocol-tests/ssh.rb
@@ -80,11 +80,11 @@ class SSHTest
socket.puts( "QUIT")
banner = socket.gets(nil)
- banner = banner[0,20]
+ banner = banner[0,20] unless( banner.nil? )
socket.close()
- if ( banner =~ /ssh/i )
+ if ( !banner.nil? && ( banner =~ /ssh/i ) )
puts "ssh alive: #{banner}" if ( @test_data['verbose'] )
return true
else