Manually SSH key generation in Windows

Introduction

This guide will show you how to manually generate SSH key in Windows environment. We will use here Putty to generate private and public SSH keys in Windows. PuTTY is an open source software and SSH and telnet client developed for the Windows platform.

When you install the PuTTY client, you also install the PuTTYgen utility, which is what you will use to generate your SSH key for a Windows enviroment.

Prerequisites

Make sure you download PuTTY msi file and install in Windows system. Here I am using Windows 10 64 bit system.

Generally your PuTTY software installed under C drive in a folder called putty.

Generating SSH Key

To generate an SSH key with PuTTYgen, follow these steps:

  • Double click on PUTTYGEN.EXE file to open the PuTTYgen utility.
  • Make sure you select the Key type as SSH-2 RSA as shown in the below image:
ssh key generation in windows
  • For Type of key to generate, select RSA radio button at the bottom left.
  • Click on Generate button to generate the public/private key pair.
  • Now you will see the progress bar in green color and when the progress bar is full, PuTTYgen generates your key pair.
ssh key generation in windows
  • Type a password in the Key passphrase field. Type the same password in the Confirm passphrase field. You can use a key without a passphrase, but this is not recommended.
ssh key generation in windows
  • Click the Save private key button to save the private key. You must save the private key. You will need it to connect to your server machine through SSH terminal.
  • You may also save the public key for later use if you do not want to copy it now.

Note: Another way of generating your public key is to load the SSH private key using Load button. Then it will ask for passphrase (password) if there is any. Type the password and your public SSH key will be displayed. Now you can copy the public key for authentication.

That’s all. Hope you got an idea how to generate public/private SSH key pair using PuTTYgen utility.

Thanks for reading.

Leave a Reply

Your email address will not be published. Required fields are marked *