Forum: JRuby Net::SSH OpenSSL::PKey::DSAError

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.
Robert B. (Guest)
on 2009-03-04 05:32
Hi all,

I'm having this problem with a JRuby script on Linux (RHEL).

<code>
[me@myserver bin]$ jruby ssh_test.rb
/export/me/bin/jruby-1.1.6/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/openssl.rb:116:in
`ssh_do_sign': bad sig size (OpenSSL::PKey::DSAError)
        from
/export/me/bin/jruby-1.1.6/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/authentication/key_manager.rb:154:in
`sign'
        from
/export/me/bin/jruby-1.1.6/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/authentication/methods/hostbased.rb:41:in
`authenticate_with'
<snip>
        from ssh_test.rb:4
[me@myserver bin]$ cat ssh_test.rb
require 'rubygems'
require 'net/ssh'

Net::SSH.start('otherserver', 'me', :password => "secret") do |ssh|
    puts ssh.exec!("hostname")
end
</code>

Does anyone know if Net::SSH is supposed to run under JRuby?


Thanks...
Robert B. (Guest)
on 2009-03-04 09:22
OK found out that Net:SSH 2.0.11 is broken under JRuby.  Rolled back to
Net:SSH 2.0.4 and now it works.
Robert B. (Guest)
on 2009-03-04 09:23
Forgot to add: needed to apply hacks documented here:
http://jptarqu.blogspot.com/2008/09/how-to-make-ne...
This topic is locked and can not be replied to.