检查SSH 2015/03/26 14978 require 'net/ssh' def test_ssh_connect(address,username,password) begin Net::SSH.start(address, username, :password => password) rescue Exception => e logger.info('verify ssh failed:'+e.to_s) return true end return false end