Recently, I had to blow away my VirtualBox VM (by the way, version 3.1
is loaded with awesome), and failed to backup my SSH keys from that box.
Rather then regenerate, and repropogate to all the servers on the
network, I should be able to use the existing PuTTY keys I've setup on
my Windows box. No?
So, my question is this: how can I import the PuTTY keys into my Debian
SSH client. Just copying the private key into my ~/.ssh/ directory,
renaming, and giving it the appropriate permissions fails with
'ssh-add', saying the passphrase I'm giving it is bad, which it isn't.
So, I'm guessing the format is different, and it's not reading the key
correctly, or something. Anyone have success here, or know the
appropriate path to take?
Thanks,
--
. O . O . O . . O O . . . O .
. . O . O O O . O . O O . . O
O O O . O . . O O O O . O O O
I figured this out, in case anyone is curious. With the PuTTY suite of
utilities, provided is a tool called 'PuTTYGen'. It generates SSH keys
for SSH key authentication, but it is its own thing, which is not
compatible with OpenSSH or SSH.com key agents.
In that utility, load up your private key, then you can export it to an
OpenSSH or SSH.com compatible file. SCP that file over to your OpenSSH
client box to the ~/.ssh/ directory, and 'ssh-add' the new key. So, in
my case, it was exported as 'id_rsa'.
You can then copy/paste the public portion of the key, as printed in the
utility, save that to a different file (id_rsa.pub), and put that in
your OpenSSH client machine's ~/.ssh/ directory as well.
Don't forget to set the appropriate permissions. OpenSSH wants only user
access, and not group or other access to either file, before 'ssh-add'
will work.
Cheers!