From: Jamis Buck Date: 2004-07-21T07:01:39+09:00 Subject: Re: Now a different Net:SSH error... Hal Fulton wrote: > Jamis Buck wrote: >> Net::SSH knows how to parse out the name/value pairs, but it doesn't >> know what to do with them, and since I've never been able to generate >> a key that has those name/value pairs, I can't duplicate the problem. :( >> >> What REALLY needs to happen is I need to write some code that will >> query the active ssh-agent (if one is running) and have the agent give >> me all the info I need about the keys. >> >> Like I said, it's on my TODO list. The workaround is to specify the >> username/password in your script, or to generate a key that doesn't >> have the name/value pairs in them. > > > Well... I *did* specify the username and password in the script. Ouch. Yah, that makes sense. I guess I'm reading all the available keys even if the username/password is given... I guess I should make it not die if it can't load a key... I'll fix my copy, but if you'd like yours to work just wrap a begin/rescue clause around line 196 of net/ssh.rb. That ought to do the trick. > As for generating a new key... I'm not sure what to use for -t: > > $ ssh-keygen > You must specify a key type (-t). > Usage: ssh-keygen [options] > Options: > -b bits Number of bits in the key to create. > -c Change comment in private and public key files. > -e Convert OpenSSH to IETF SECSH key file. > -f filename Filename of the key file. > -i Convert IETF SECSH to OpenSSH key file. > -l Show fingerprint of key file. > -p Change passphrase of private key file. > -q Quiet. > -y Read private key file and print public key. > -t type Specify type of key to create. > -B Show bubblebabble digest of key file. > -C comment Provide new comment. > -N phrase Provide new passphrase. > -P phrase Provide old passphrase. Yah, I've tried various permutations of options with ssh-keygen and never managed to get a key with "parameter" values. That's why I'm dying for someone to show me how they generated their key, but everyone I've talked to that has one with the parameter values can't remember how they generated it! :) Ah, well. -- 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."