tags:

views:

17

answers:

2

I generated an OpenSSH private key using puttygen (and exported it in OpenSSH format). How can I put a password on this existing key (I know how to generate a new key with a password)?

Thanks!

A: 

Try the command ssh-keygen -p -f keyfile

From the ssh-keygen man page

 -p      Requests changing the passphrase of a private key file instead of
         creating a new private key.  The program will prompt for the file
         containing the private key, for the old passphrase, and twice for
         the new passphrase.
sigjuice
A: 

Use the -p option to ssh-keygen. This allows you to change the password rather than generate a new key.

BillThor