What are SSH Keys
As mentioned above, secure shell keys are the keys used to authenticate the connection between two devices as the SSH method is based on the client server model. There are mainly two keys required to establish a connection between two devices; one is a public key that is to be shared with the system that is being accessed remotely. The other key is the private key that is used by the client system to decrypt the messages received from the remote system or server.
Generating SSH Keys on Linux Mint 21
Generating SSH keys on Linux Mint 21 is an easy process if one follows the below mentioned steps:
Step 1: To start the SSH key generating process use the below given command and give a name to the key file:
Step 2: Next enter the security key that is easy to remember as there is no option of setting an new password for the same file if you forget the password:
Now re-enter the password:
Once both the password matches the SSH key will be generated:
Now you can check if the SSH key is generated or not using the ls command, remember that there are two files created when the SSH key is generated one is a public key that will be shared to the system you are accessing.
Whereas the other is the private key that must not be shared with anyone as the system will decrypt the message from the server using private key:
To view your SSH public key use:
Conclusion
SSH keys are sort of authentication keys used to access other systems remotely in a more secure way. There are mainly two keys required to establish a connection between two devices; one is a public key that is to be shared with the system which is being accessed remotely. The other key is the private key that is used by the client system to decrypt the messages received from the remote system or server.