Net::SSH OpenSSL::PKey::DSAError


#1

Hi all,

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

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

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

Thanks…


#2

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.


#3

Forgot to add: needed to apply hacks documented here:
http://jptarqu.blogspot.com/2008/09/how-to-make-netssh-work-with-jruby-on.html