Methods of Changing the SSH Private Key Passphrase in Linux Mint 20
For changing the SSH private key passphrase in Linux Mint 20, you can choose any of the following two methods according to your preference. However, before proceeding with these methods, we would like to share how you can generate a new SSH key. All you have to do is to execute the following command in your Linux Mint 20 terminal:
Once a new SSH key has been generated, you will be able to see something like shown in the image below on your Linux Mint 20 terminal:
After generating an SSH key, you can easily proceed with either of the following two methods.
Method 1: Changing the Passphrase for the Current User’s SSH Private Key
For changing the passphrase for the current user’s SSH private key, you will have to execute the command shown below in your Linux Mint 20 terminal:
Once you run this command, you will be prompted to enter the new passphrase for the current user’s SSH private key. When you will do so, you will be asked to re-enter the very same passphrase for confirmation. After fulfilling these formalities, a new passphrase will be successfully set up for the current user’s SSH private key, as shown in the following image:
Method 2: Changing the Passphrase for a Specified SSH Private Key
For changing the passphrase for a specified SSH private key, you will have to execute the command shown below in your Linux Mint 20 terminal:
Here, you can replace “.ssh/id_rsa” with the exact path to your specific SSH private key.
Once you run this command, you will be prompted to enter the old passphrase. After that, you will be asked to enter the new passphrase for the specified SSH private key. When you will do so, you will be asked to re-enter the very same passphrase for confirmation. After fulfilling these formalities, a new passphrase will be successfully set up for the specified SSH private key as shown in the following image:
Conclusion
This guide explained the two methods of changing the SSH private key passphrase on a Linux Mint 20 system. The first method was quite generic; however, you can use the second method to change the passphrase for a specific SSH private key.