I have an existing public/private key pair. The private key is password protected, and the encryption may be either RSA or DSA. These keys are the kind you generate with ssh-keygen
and generally store under ~/.ssh
.
I'd like to change the private key's password. How do I go about it, on a standard Unix shell?
Also, how do I simply remove the password? Just change it to empty?
Best Answer
To change the passphrase on your default key:
If you need to specify a key, pass the
-f
option:then provide your old and new passphrase (twice) at the prompts. (Use
~/.ssh/id_rsa
if you have an RSA key.)More details from
man ssh-keygen
: