History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-2747
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ola Bini
Reporter: Dirk Vleugels
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
JRuby

Net::SSH io padding error

Created: 03/Jul/08 09:13 AM   Updated: 14/Aug/08 04:51 AM
Component/s: OpenSSL
Affects Version/s: JRuby 1.1.2
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Client MacosX 10.5, Server: SSH-2.0-OpenSSH_4.3p2 on Debian-9etch2

Testcase included: yes


 Description  « Hide
$ bin/jruby --version
ruby 1.8.6 (2008-05-28 rev 6586) [i386-jruby1.1.2]

$ bin/gem list --local

*** LOCAL GEMS ***

jruby-openssl (0.2.3)
net-ssh (2.0.3)
rake (0.8.1)
rspec (1.1.4)
sources (0.0.1)
require 'rubygems'
require 'net/ssh'

Net::SSH.start("target.host.com", "user", :password => "password") do |ssh|
 result = ssh.exec!("ls -l")
 puts result
end

Execution results in the following error:

/Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/packet_stream.rb:195:in `poll_next_packet': padding error, need 3266548518 block 16 (Net::SSH::Exception)
from /Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/packet_stream.rb:85:in `next_packet'
from /Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/packet_stream.rb:84:in `loop'
from /Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/packet_stream.rb:84:in `next_packet'
from /Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/session.rb:155:in `poll_message'
from /Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/session.rb:150:in `loop'
from /Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/session.rb:150:in `poll_message'
from /Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/transport/session.rb:135:in `next_message'
from /Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/authentication/session.rb:81:in `next_message'
... 8 levels...
from /Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh/authentication/session.rb:60:in `authenticate'
from /Users/dvl/local/jruby-1.1.2/lib/ruby/gems/1.8/gems/net-ssh-2.0.3/lib/net/ssh.rb:186:in `start'
from ssh.rb:4

Regards,
Dirk



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Charles Oliver Nutter - 03/Jul/08 12:06 PM
Ola, any change you can look at this? Every step toward getting Net::SSH working makes me happier.

Vladimir Sizikov - 08/Jul/08 09:36 AM
Reproduced locally, and users asking for this on IRC too

Bill Dortch - 08/Jul/08 12:45 PM
FYI, when I looked at this last fall, the problem appeared to be in Cipher.java, but I wasn't able to determine exactly what it was doing wrong. Unfortunately, I haven't had (and still don't have) time to revisit this, but see my notes at JRUBY-1692. The error message is a little different than what I was getting, but I suspect it is the same issue. I found the :verbose => :debug option somewhat helpful in tracing the calls, and Cipher.java has a DEBUG flag that can be set to provide additional info.

Ola Bini - 13/Aug/08 08:22 AM
This was fixed together with the other SSH bug. It was the IV-problem documented there.