Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'rubygems'
- require 'net/ssh'
- begin
- Net::SSH.start("1.2.3.4", "root", :password=>"secret") do |ssh|
- puts "connected"
- end
- rescue
- puts "something wrong"
- end
- # manual ssh to host returns "Connection closed by 1.2.3.4"
- # net-ssh doesn't raise exception, continues attempting connection
Add Comment
Please, Sign In to add comment