A public and private key pair is required for public key authentication in SSH. SSH keys can easily be created using ssh-keygen in Linux and other Unix-based operating systems but not so in Windows.
One way you can create a public and private key pair for SSH authentication on Windows is by using a freely available PuTTY Key Generator.
Steps to generate SSH key pair using PuTTYgen:
Download PuTTY Key Generator
) from the official download site and launch the program.
Select the type of key to generate and enter associated option for the key type and click on the Generate
Move the mouse to provide random seed for the key.
Edit the key's comment if necessary.
Enter passphrase to protect the key if necessary.
Click the Save public key
button to save the public key.
Copy the content of the displayed public key instead if you want to place it in an OpenSSH server's authorized_keys file for public key authentication method.
Enter the location and file name and click on the Save
Click on the Save private key
button to save the private key.
Enter the location and file name for the private key and click on the Save
Convert the generated private key to OpenSSH
format to use the key with OpenSSH
Author: Mohd Shakir Zakaria
Cloud architect by profession but always consider himself as a developer, entrepreneur and an opensource enthusiast.
Discuss the article:
Comment anonymously. Login not required.