Net/SSH bug resurfaced?

I’m trying to get net/ssh working and I’m getting the following error:

/usr/local/jruby_gems/gems/net-ssh-2.0.6/lib/net/ssh/transport/packet_stream.rb:195:in
`poll_next_packet’: padding error, need 55090959 block 16
(Net::SSH::Exception)

It looks like the same error in
http://jira.codehaus.org/browse/JRUBY-2747. I’m not sure if I’m doing
something wrong, or the issue popped back up.

My code:

require ‘rubygems’
require ‘net/ssh’

Net::SSH.start(‘ecom-dev2’, “csevans”, :password => “password”) do |ssh|
result = ssh.exec!(“ls -l”)
puts result
end

============================
$ jruby -S gem list

*** LOCAL GEMS ***

actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activerecord-jdbc-adapter (0.9)
activeresource (2.2.2)
activesupport (2.2.2)
jruby-openssl (0.3)
log4r (1.0.5)
net-ssh (2.0.6)
rails (2.2.2)
rake (0.8.3)
warbler (0.9.11)

$ $ jruby -v
jruby 1.1.5 (ruby 1.8.6 patchlevel 114) (2008-11-03 rev 7996)
[sparc-java]

I tried it under 1.1.6RC1 as well with the same result.


Chris


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I had the same exact error yesterday. It WAS working before. Did
something happend?

Best regards,
Juan P. Tarquino

On Wed, Dec 17, 2008 at 9:56 AM, Chris E. [email protected]
wrote:

My code:

jruby-openssl (0.3)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

I’m not sure what is going on exactly, but I rolled back to
net-ssh-2.0.5 and got this error:

$ jruby ./main.rb
/usr/local/jruby-1.1.5/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:38:in
require': no such file to load -- net/ssh/ruby_compat (LoadError) from /usr/local/jruby_gems/gems/net-ssh-2.0.5/lib/net/ssh.rb:10 from /usr/local/jruby_gems/gems/net-ssh-2.0.5/lib/net/ssh.rb:36:in require’
from
/usr/local/jruby-1.1.5/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require’
from ./main.rb:2

I rolled back to net-shh-2.0.4 and it is working.

As an aside, what the current way to require a certain gem version? I
can’t seem to find the right command. rubygems version 1.3.1

On Wed, Dec 17, 2008 at 10:16 AM, Juan P. Tarquino
[email protected] wrote:

require ‘rubygems’

net-ssh (2.0.6)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

It should just be -v to install a specific version of a gem. Seems like
newer net-ssh have exposed additional problems in jruby-openssl. Someone
want to get a diff and see what they changed?

  • Charlie

Chris E. wrote:

`require’

(Net::SSH::Exception)

actionmailer (2.2.2)
warbler (0.9.11)


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email