It’s possible you have earlier generated a ssh key without password/ passphrase. Later you found that for security reasons you wish to add a password to the key file.
Let’s learn how to add password or passphrase to existing SSH Key. The method is also valid for changing the passphrase to the key. Use below command to do that.
ssh-keygen -p -f /path/to/keyfile
ssh-keygen man page
-p Requests changing the passphrase of a private key file instead of creating a new private key. The program will prompt for the file containing the private key, for the old passphrase, and twice for the new passphrase. -f filename Specifies the filename of the key file. Example: ssh-keygen -p -f ~/.ssh/id_rsa
Example:
surya@x:~$ ssh-keygen -p -f /path/to/key Key has comment 'key' Enter new passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved with the new passphrase.
This is how you can change or add the password to pre generated OpenSSH Keyfile.
If you are working with MySQL or MariaDB web server, sooner or later you will…
To edit the crontab entries you use crontab -e. The command will check for the…
Installation method for COMODO SSL Certificate If you have generated the CSR and purchased or…
In AWS S3, you might want to provide the access to selected users to selected…
If you are working on Linux OS, finding files effectively always a tricky part. Like…
What is SSL? SSL (Secure Sockets Layer) is a standard security protocol for establishing encrypted…