net-ssh-shell
net-ssh-shell copied to clipboard
Don't lock down net-ssh dependency so strictly
Bump (or hand over the project?)
+1 for handover. That said, I think there are bugs regardless. I built the gem with relaxed gemspec, and against net-ssh 2.7.x and 2.9.x, using the example from README.md, it just blocks forever:
require 'net/ssh/shell'
Net::SSH.start('127.0.0.1', ENV['USER']) { |ssh|
ssh.shell { |sh|
sh.execute "cd /usr/local"
sh.execute "pwd"
sh.execute "export FOO=bar"
sh.execute "echo $FOO"
}
}
Note that I am able to ssh to 127.0.0.1 with key auth (ssh agent). So this example should work, but it just blocks forever. Stack trace after SIGINT:
/home/rwh/.gem/ruby/2.2.1/gems/net-ssh-2.7.0/lib/net/ssh/ruby_compat.rb:30:in `select': Interrupt
from /home/rwh/.gem/ruby/2.2.1/gems/net-ssh-2.7.0/lib/net/ssh/ruby_compat.rb:30:in `io_select'
from /home/rwh/.gem/ruby/2.2.1/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:209:in `process'
from /home/rwh/.gem/ruby/2.2.1/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `block in loop'
from /home/rwh/.gem/ruby/2.2.1/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'
from /home/rwh/.gem/ruby/2.2.1/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:169:in `loop'
from /home/rwh/.gem/ruby/2.2.1/gems/net-ssh-2.7.0/lib/net/ssh/connection/session.rb:118:in `close'
from /home/rwh/.gem/ruby/2.2.1/gems/net-ssh-2.7.0/lib/net/ssh.rb:208:in `start'