Is there a way to fail immediately after trying a username and password sequence with Net::SSH.start()
? I am looking to test to see if credentials work then stop afterwards, here is the code that I have
output = 0
Net::SSH.start('host', 'user', :password => "pass") do |ssh|
output = ssh.exec! 'echo "1"'
end
puts output