For linux or ubuntu user who is lazy to login to remote by typing password or plainly to improve security measure. You may generate a RSA key type to authenticate the login process. Generating the RSA key is the very first step.
1. Open your command prompt.
2. Type the following :
sudo ssh-keygen -t rsa
*Note : If you are using CentOS or Redhat you may just use ssh-keygen -t rsa
3. The the following prompt will appear after you have key in the administrator/root password:
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
4. Just type myremotehost they press ¨Enter¨. Then the following prompt will appear :
Enter passphrase (empty for no passphrase):
5. Type in any keyword or password that you need. After ¨Enter¨ is pressed the following prompt will appear :
Enter same passphrase again:
6. Type in the same keyword or password used in step 5. After that the ssh-keygen will generate the pair of key and will be placed on the location selected in step 3.
Your identification has been saved in myremotehost.
Your public key has been saved in myremotehost.pub.
The key fingerprint is:
7. Type the following :
8. If the key is generated you should get the following result :
8. Congrats, your RSA key pair is generated successfully.
The RSA key is ready to be use . How to apply the RSA key will be shown on the next post 🙂