You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Oracle Linux: How to Add/Replace a Passphrase for an existing ssh Key

in Linux 1 comment

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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!