OpenSSL::PKey::PKeyError: invalid key with net-ssh
--------------------------------------------------
Key: JRUBY-3532
URL: http://jira.codehaus.org/browse/JRUBY-3532
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby-OpenSSL 0.4, JRuby 1.2, JRuby 1.1.6
Reporter: Steven Parkes
Assignee: Thomas E Enebo
Most net-ssh operations seem to give a new kind of error:
"OpenSSL::PKey::PKeyError: invalid key". Seems to happen with both 1.2 and
1.1.6 and all the versions of net-ssh I tired, notably 2.0.4 and 2.0.11).
mbp:w0 smparkes$ jirb
irb(main):001:0> require 'rubygems'
=> false
irb(main):002:0> require 'net/ssh'
=> true
irb(main):003:0> Net::SSH.start('localhost', 'myuser', :verbose => :debug) {
|ssh| puts ssh.exec!('uptime') }
D, [2009-03-26T13:43:48.047000 #89016] DEBUG -- net.ssh.transport.session[90]:
establishing connection to localhost:22
D, [2009-03-26T13:43:48.259000 #89016] DEBUG -- net.ssh.transport.session[90]:
connection established
I, [2009-03-26T13:43:48.260000 #89016] INFO --
net.ssh.transport.server_version[92]: negotiating protocol version
D, [2009-03-26T13:43:48.273000 #89016] DEBUG --
net.ssh.transport.server_version[92]: remote is `SSH-2.0-OpenSSH_5.1'
D, [2009-03-26T13:43:48.273000 #89016] DEBUG --
net.ssh.transport.server_version[92]: local is `SSH-2.0-Ruby/Net::SSH_2.0.11
java'
D, [2009-03-26T13:43:48.380000 #89016] DEBUG -- tcpsocket[9c]: read 784 bytes
D, [2009-03-26T13:43:48.381000 #89016] DEBUG -- tcpsocket[9c]: received packet
nr 0 type 20 len 780
I, [2009-03-26T13:43:48.382000 #89016] INFO --
net.ssh.transport.algorithms[9e]: got KEXINIT from server
I, [2009-03-26T13:43:48.384000 #89016] INFO --
net.ssh.transport.algorithms[9e]: sending KEXINIT
D, [2009-03-26T13:43:48.386000 #89016] DEBUG -- tcpsocket[9c]: queueing packet
nr 0 type 20 len 508
D, [2009-03-26T13:43:48.387000 #89016] DEBUG -- tcpsocket[9c]: sent 512 bytes
I, [2009-03-26T13:43:48.387000 #89016] INFO --
net.ssh.transport.algorithms[9e]: negotiating algorithms
D, [2009-03-26T13:43:48.388000 #89016] DEBUG --
net.ssh.transport.algorithms[9e]: negotiated:
* kex: diffie-hellman-group-exchange-sha1
* host_key: ssh-rsa
* encryption_server: aes128-cbc
* encryption_client: aes128-cbc
* hmac_client: hmac-sha1
* hmac_server: hmac-sha1
* compression_client: none
* compression_server: none
* language_client:
* language_server:
D, [2009-03-26T13:43:48.389000 #89016] DEBUG --
net.ssh.transport.algorithms[9e]: exchanging keys
D, [2009-03-26T13:43:48.845000 #89016] DEBUG -- tcpsocket[9c]: queueing packet
nr 1 type 34 len 20
D, [2009-03-26T13:43:48.846000 #89016] DEBUG -- tcpsocket[9c]: sent 24 bytes
D, [2009-03-26T13:43:48.849000 #89016] DEBUG -- tcpsocket[9c]: read 152 bytes
D, [2009-03-26T13:43:48.852000 #89016] DEBUG -- tcpsocket[9c]: received packet
nr 1 type 31 len 148
D, [2009-03-26T13:43:48.874000 #89016] DEBUG -- tcpsocket[9c]: queueing packet
nr 2 type 32 len 140
D, [2009-03-26T13:43:48.876000 #89016] DEBUG -- tcpsocket[9c]: sent 144 bytes
D, [2009-03-26T13:43:48.921000 #89016] DEBUG -- tcpsocket[9c]: read 720 bytes
D, [2009-03-26T13:43:48.925000 #89016] DEBUG -- tcpsocket[9c]: received packet
nr 2 type 33 len 700
OpenSSL::PKey::PKeyError: invalid key
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/openssl.rb:70:in
`ssh_do_verify'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb:187:in
`verify_signature'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb:69:in
`exchange_keys'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/algorithms.rb:331:in
`exchange_keys'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/algorithms.rb:172:in
`proceed!'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/algorithms.rb:163:in
`send_kexinit'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/algorithms.rb:118:in
`accept_kexinit'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/session.rb:186:in
`poll_message'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/session.rb:164:in
`loop'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/session.rb:164:in
`poll_message'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/session.rb:201:in
`wait'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/session.rb:199:in
`loop'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/session.rb:199:in
`wait'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh/transport/session.rb:78:in
`initialize'
from
/usr/local/src/jruby/jruby-1.2.0/lib/ruby/gems/1.8/gems/net-ssh-2.0.11/lib/net/ssh.rb:179:in
`start'
from (irb):4
irb(main):004:0>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email