linux

Adding a passphrase to an existing SSH private key

The following command will add or change the passphrase for an existing SSH private key without regenerating the keypair.

$ ssh-keygen -p

> Enter file in which the key is (/home/user/.ssh/id_rsa): [path or enter]
> Enter new passphrase (empty for no passphrase): [new passphrase]
> Enter same passphrase again: [new passphrase]
> Your identification has been saved with the new passphrase.

more SSH posts

more Linux posts