net-ssh-shell icon indicating copy to clipboard operation
net-ssh-shell copied to clipboard

Don't lock down net-ssh dependency so strictly

Open dra1n opened this issue 11 years ago • 2 comments

dra1n avatar Apr 26 '13 13:04 dra1n

Bump (or hand over the project?)

dominicsayers avatar Aug 11 '14 14:08 dominicsayers

+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'

rickhull avatar Apr 17 '15 00:04 rickhull