Generate SSH Keys Using PuTTY



References:


Steps To Generate SSH Keys Using PuTTY:

  1. Install Putty first. Please refer here https://muzakkirskills.blogspot.com/2023/05/connect-to-linux-from-windows-by-using.html  .
  2. Press the Windows button.

  3. Type puttygen.

  4. right-click PuTTYgen, click Run as Administrator.

  5. Click Generate in the PuTTY Key Generator window. Please note that key generated is using RSA types. You can change it to any format that you preferred.

  6. To fill up the green bar, move the pointer around in the grey area.

  7. After done, save the public key and private key. For public key, please make sure that the file name extension is .pub. Example: Ramlah.pub. For private key, please make sure that the file name extension is .ppk. Example Ramlah.ppk.

  8. To use the SSH key to connect to your target server or system, make sure that you have already created a user in your system. Example:Ramlah. Please note that the user I created is the user with admin privileged. You can create the normal one if you preferred to do it. For this example, I created a user named Ramlah.


  9. Go to Ramlah home directory.


  10. Created .ssh directory directory.


  11. Give permission to .ssh directory.


  12. Go to .ssh directory and create one file called authorized_keys.


  13. Open Ramlah.ppk that we have saved previously on number 7. Please make sure that you open Ramlah.ppk using puttygen.

  14. Copy the key from the red box area, put it inside the authorized keys.

  15. Set the permission to 644 for authorized_keys .


  16. Open putty.  Go to Connection > SSH > Auth . Open your private key.

  17. Go back to Session and connect to your target server.

  18. Enter your user. In my example it is Ramlah.

  19. You will successfully login your target server with your preferred user without using password but by using private key.


Comments

Archive

Contact Form

Send