From: Jamis Buck Date: 2004-07-13T07:25:27+09:00 Subject: Re: [ANN] Net::SSH 0.0.3 Jochen Immend�rfer wrote: > Thank you for the quick reply. The additional require made it work for me. > > But another question: > > I've got my system configured with public and private keys the way that I can > connect without password. Itworks from the command-line. > > But > > Net::SSH.start('localhost') > > produces the error: > > OpenSSL::PKey::PKeyError: wrong public key type > from /usr/lib/ruby/gems/1.8/gems/net-ssh-0.0.3/lib/net/ssh/service/userauth.rb:207:in > `sign' > from /usr/lib/ruby/gems/1.8/gems/net-ssh-0.0.3/lib/net/ssh/service/userauth.rb:207:in > `try_publickey_auth_with' > from /usr/lib/ruby/gems/1.8/gems/net-ssh-0.0.3/lib/net/ssh/service/userauth.rb:181:in > `try_publickey_auth' > from /usr/lib/ruby/gems/1.8/gems/net-ssh-0.0.3/lib/net/ssh/service/userauth.rb:180:in > `each' > from /usr/lib/ruby/gems/1.8/gems/net-ssh-0.0.3/lib/net/ssh/service/userauth.rb:180:in > `try_publickey_auth' > from /usr/lib/ruby/gems/1.8/gems/net-ssh-0.0.3/lib/net/ssh/service/userauth.rb:114:in > `process' > from /usr/lib/ruby/gems/1.8/gems/net-ssh-0.0.3/lib/net/ssh.rb:123:in > `open' > from /usr/lib/ruby/gems/1.8/gems/net-ssh-0.0.3/lib/net/ssh.rb:67:in > `start' > from (irb):2 > > what is the 'right' public key type? I created my keys with > > ssh-keygen -t dsa > > Is that wrong? Woops. My bad. Apparently you can't use public/private key authentication using a dsa key right now. I'll work on that. I just need to not use the 'sign' method of the key object, since that doesn't work for all key types... Look for a fix in 0.0.4... In the meantime, keys generated using 'ssh-keygen -t rsa' should work fine. (If they don't, let me know, because they work for me.) -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis "I use octal until I get to 8, and then I switch to decimal."