-
-
Notifications
You must be signed in to change notification settings - Fork 444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net-ssh does not handle non-multiplexed ssh connections #121
Comments
Thanks for the report. The project is in maintenance mode but if someone wants to submit a pull request for this I'll happily merge it in. |
I might misunderstood this issue but you should be able to open different connection and do just one exec per connection |
I also ran in to this issue when trying to use Serverspec to talk to a server with MaxSession set to 1. |
@jakerobinson did you ever resolve / get around this issue? |
@davidpowerwpe Sadly I never had a chance to fix it in net-ssh. I ended up defaulting MaxSessions to 10 by deleting the line. We decided the very small security precaution was not worth breaking most of our automation. |
Guys if you can demonstrate the issue in a small net-ssh script to reproduce the issue that would make stuff much more straightforward. |
Thanks @mfazekas, I was wrong not to include that when I first submitted this issue. Setup: Add the line Run the following with the correct host and credentials: Expected result (achieved when
Actual result (
|
This doesn't works for me 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 But this does Net::SSH.start('1.2.3.4', 'root', :password => "foobar") do |ssh|
for i in 0..9
output = ssh.exec!("hostname")
puts output
ssh.process # !!!
end
end |
When an opensshd server is set to
MaxSessions 1
, disabling multiplexing, every otherexec!()
command fails withopen failed(1)
The text was updated successfully, but these errors were encountered: