Created
June 9, 2017 17:12
-
-
Save jakerobinson/827e4fec5b9e5ff45b68997006f1aceb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This fails when the remote machine's /etc/sshd_config contains the line MaxSessions 1 | |
require 'net/ssh' | |
Net::SSH.start('1.2.3.4', 'root', :password => "foobar") do |ssh| | |
for i in 0..9 | |
output = ssh.exec!("hostname") | |
puts output | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment