Remove passphrase (password) from private RSA key

Remove passphrase

openssl rsa -in ~/.ssh/id_rsa -out ~/.ssh/id_rsa_new

and enter your old passphrase

Replace key
Backup and replace your private ssh key

cp ~/.ssh/id_rsa ~/.ssh/id_rsa.backup
rm ~/.ssh/id_rsa
cp ~/.ssh/id_rsa_new ~/.ssh/id_rsa

Set key permissions

chmod 400 ~/.ssh/id_rsa

Leave a Reply

Your email address will not be published. Required fields are marked *