Oracle Linux: How to Add/Replace a Passphrase for an existing ssh Key
Applies to:
Oracle Cloud Infrastructure - Version N/A to N/A [Release 1.0]
Linux x86-64
Goal
How to Add/Replace the Passphrase for existing ssh key
Solution
To add/replace the passphrase for an existing private key without regenerating the keypair by typing the following command:
$ ssh-keygen -p -f <ssh_private key>
Eg:-
$ ssh-keygen -p -f ssh-key-2022-03-29.key Enter new passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved with the new passphrase.
To replace the existing passphrase with a new one, run the same command it would ask to provide the old passphrase and later provide new passphrase you wish
Tagged:
0