Password less SSH authentication is one of the best security practices to avoid any password expose to attacke
SSH is secure authentication mechanism, however Man-in-the-middle attack (MITM), Brute force attack these attack can expose password to the attackers.
We need two components to make a ssh key working. Public Key, Private Key, this is a like a lock and key combination. It is unique combination. In other words, you can not use different private key against different public key.
For instance, if you installed public key for user1, you can not login to user2 with the relevant private key.
Public Key – Public key must be present in remote machine
Private Key – Private key must be present in local machine. Keep your private key secter. If someone get the private key he can login to any system where the relevant public key is installed. Make sure you keep the private key safe. Use passphrase to lock the private key file.
First task will be to generate new public and private combination
In windows we will be using puttygen tool.
If you are from linux, you can use ssh-keygen -t rsa command
Put the public key information to remote machine’s /home/user/.ssh/authorized_keys file
Linux user can use ssh-copy-id command install public key to remote machine automatically.
Putty user have to choose private File from Putty > SSH > Auth path
Linux user can use ssh root@<server ip/host> -i /path/to/private-key.pem
You can check the video tutorial to know Password less SSH authentication
Hope you like the the tutorial, please share and subscribe our YouTube channel https://www.youtube.com/channel/UCGqiD2zV8JiOjIUSBN468Zg