I like to have the same RSA private key on all of my linux and Mac OS X boxes in order to do this, I have a need to have passphrases on certain boxes and not on others – I have changed my passphrase by typing the below in
To update your SSH private key passphrase in place without altering the keypair, run:
cli
ssh-keygen -f ~/.ssh/id_rsa -p
Source – the man-pages below:
-f filename
Specifies the filename of the key file.
-p Requests changing the passphrase of a private key file instead of creating a new private key. The pro-
gram will prompt for the file containing the private key, for the old passphrase, and twice for the new
passphrase.
ssh-keygen -p -f ~/.ssh/id_rsa (and -o -a 100 to upgrade the KDF rounds to modern OpenSSH format) is great because it re-encrypts the private key in place without changing the public key fingerprint on any remote authorized_keys.
Saved me from rotating keys across 60+ jump hosts and routers when updating our vault passphrase policy—zero changes needed on the remote servers.
ssh-keygen -p -f ~/.ssh/id_rsa(and-o -a 100to upgrade the KDF rounds to modern OpenSSH format) is great because it re-encrypts the private key in place without changing the public key fingerprint on any remoteauthorized_keys.Saved me from rotating keys across 60+ jump hosts and routers when updating our vault passphrase policy—zero changes needed on the remote servers.