Forum: JRuby Net-SSH 2.0.8 error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jacob K. (Guest)
on 2009-02-07 02:17
(Received via mailing list)
I was trying to get capistrano set up to work well with glassfish, when
I ran into a SSH padding error. A quick google turned up issue 2747
(http://jira.codehaus.org/browse/JRUBY-2747), which looked pretty much
exactly like what I was getting. Sure enough, the test case listed there
failed the same way as in the bug on my computer.

I notice that that issue lists itself as fixed, though, so I wonder: Why
is it showing up again, and what should I do to fix it?

gems: jruby-openssl 0.3, net-ssh 2.0.8, jruby 1.1.7 (rev 8810) running
on ubuntu.

sshtest.rb:
require 'rubygems'
require 'net/ssh'

Net::SSH.start("127.0.0.1", "jacob", :password => "######") do |ssh|
 result = ssh.exec!("ls -l")
 puts result
end

jacob@jacobDesktop:~/scripts$ jruby sshtest.rb
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/transport/packet_stream.rb:195:in
`poll_next_packet': padding error, need 2565336562 block 16
(Net::SSH::Exception)
    from
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/transport/packet_stream.rb:85:in
`next_packet'
    from
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/transport/packet_stream.rb:84:in
`loop'
    from
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/transport/packet_stream.rb:84:in
`next_packet'
    from
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/transport/session.rb:160:in
`poll_message'
    from
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/transport/session.rb:155:in
`loop'
    from
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/transport/session.rb:155:in
`poll_message'
    from
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/transport/session.rb:140:in
`next_message'
    from
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/authentication/session.rb:81:in
`next_message'
     ... 10 levels...
    from
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/authentication/session.rb:60:in
`authenticate'
    from
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh.rb:186:in
`start'
    from sshtest.rb:4


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Juan P. Tarquino (Guest)
on 2009-02-07 19:27
(Received via mailing list)
I noticed too that error resurfacing in the newer versions of NET:SSH.
The
only thing that worked for me was to go back to the 2.0.4 version of the
gem.

Best regards,
Juan P. Tarquino
Charles Oliver N. (Guest)
on 2009-02-09 21:59
(Received via mailing list)
If there isn't one already, can you file a bug for this? And if you're
feeling saucy (especially if someone knows crypto stuff), please try to
investigate a fix.

Juan P. Tarquino wrote:
>
>     running on ubuntu.
>     jacob@jacobDesktop:~/scripts$ jruby sshtest.rb
> 
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/transport/packet_stream.rb:84:in
>       from
>     /home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh.rb:186:in
>
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
Jacob K. (Guest)
on 2009-02-09 22:55
(Received via mailing list)
Filed issue 3385 (http://jira.codehaus.org/browse/JRUBY-3385), since I
couldn't figure out how to re-open 2747.

I'm totally clueless when it comes to both network stuff and crypto, so
I'm probably not the right one to investigate a fix.

Charles Oliver N. wrote:
>> Juan P. Tarquino
>>
>>     Net::SSH.start("127.0.0.1", "jacob", :password => "######") do |ssh|
>>       from
>>
>> 
/home/jacob/jruby/lib/ruby/gems/1.8/gems/net-ssh-2.0.8/lib/net/ssh/transport/session.rb:155:in
>>
>>
>> ---------------------------------------------------------------------
>
>    http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.