SSH keys are cryptographic keys that enable secure communication between a client and a server. The public key is stored on the server, while the private key remains on the client’s computer. This setup is critical for ensuring secure connections, especially in environments where security is a priority.
On Windows, PuTTY Key Generator, also known as PuTTYgen, is a widely-used tool for creating SSH key pairs. It supports various key types like RSA, DSA, ECDSA, and EdDSA. PuTTYgen is compatible with Windows and other operating systems, providing flexibility in generating and managing SSH keys.
For users who need to generate SSH keys on Windows, using PuTTYgen is straightforward. While Linux and macOS users might prefer the built-in ssh-keygen command, PuTTYgen offers an intuitive interface that simplifies the key generation process on Windows.
Related: How to generate SSH key pairs
Steps to generate SSH key pair using PuTTYgen:
- Download PuTTY Key Generator (PuTTYgen) for your CPU architecture from the official download site.
Related: PuTTYgen official download site
- Launch PuTTYgen.
- Select the type of key to generate and the size of the key in the Parameters section.
Use default values if you're not sure about the parameters.
- Click on the Generate button.
- Move your mouse around the blank area create some randomness as a seed for the key.
- Edit the key's comment if necessary.
- Enter a passphrase to protect the key if necessary.
- Click the Save public key button to save your 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.
- Choose a location and provide a filename, and click on the Save button.
- Click on the Save private key button to save the private key.
Keep the private key file secure, and do not share it with unauthorized individuals.
- Enter the location and file name for the private key and click on the Save button.
- Convert the generated private key to OpenSSH format to use the key with OpenSSH client.
Mohd Shakir Zakaria is an experienced cloud architect with a strong development and open-source advocacy background. He boasts multiple certifications in AWS, Red Hat, VMware, ITIL, and Linux, underscoring his expertise in cloud architecture and system administration.
Comment anonymously. Login not required.