PuTTYgen - SSH Key Generator Guide
Learn how to generate, manage, and convert SSH keys using PuTTYgen for secure authentication
What is PuTTYgen?
PuTTYgen (PuTTY Key Generator) is a tool for creating and managing SSH key pairs. It's an essential component of the PuTTY suite that enables public key authentication, which is more secure than password-based authentication.
PuTTYgen can generate new key pairs, import existing keys, convert between different key formats, and change key passphrases. It creates keys in PuTTY's native .ppk (PuTTY Private Key) format.
Why Use SSH Keys?
- ✓More Secure: SSH keys use cryptographic algorithms that are virtually impossible to brute force
- ✓No Password Typing: Authenticate without entering passwords, reducing exposure to keyloggers
- ✓Automation Friendly: Enable automated scripts and deployments without storing passwords
- ✓Widely Supported: Compatible with all major SSH servers and cloud platforms
How to Generate SSH Keys with PuTTYgen
Step 1: Open PuTTYgen
Launch PuTTYgen.exe from your PuTTY installation directory or Start menu.
Step 2: Select Key Type
Choose RSA as the key type and set the number of bits to 2048 or 4096 for stronger security.
Step 3: Generate the Key Pair
Click the Generate button and move your mouse randomly in the blank area to create randomness.
Step 4: Add Key Passphrase
Enter a strong passphrase in the Key passphrase field and confirm it. This adds an extra layer of security.
Step 5: Save Private Key
Click Save private key and save the .ppk file in a secure location. Never share this file.
Step 6: Copy Public Key
Copy the public key from the text box at the top and add it to your server's authorized_keys file.
Key Type Options
RSA (Recommended)
The most widely supported and tested algorithm. Use 2048 bits minimum, 4096 bits for maximum security.
ECDSA
Elliptic Curve DSA - smaller key sizes with equivalent security. Good for performance-critical applications.
Ed25519
Modern, fast, and secure. Increasingly popular but may not be supported on older systems.
Important Security Tips
- • Always use a passphrase - Protects your private key if it's stolen
- • Never share your private key - Only the public key should be distributed
- • Keep private keys secure - Store in encrypted locations with restricted permissions
- • Use different keys for different purposes - Don't reuse the same key everywhere
- • Backup your keys - Store encrypted backups in secure locations
Converting Key Formats
PuTTYgen can convert between different key formats:
OpenSSH to PuTTY (.ppk)
- Click Conversions → Import key
- Select your OpenSSH private key file
- Click Save private key to create a .ppk file
PuTTY to OpenSSH
- Load your .ppk file in PuTTYgen
- Click Conversions → Export OpenSSH key
- Save the file without the .ppk extension
Common PuTTYgen Tasks
Change Passphrase
Load your key, enter a new passphrase, and save. The public key remains unchanged.
View Key Fingerprint
Load your key to see its fingerprint - useful for verification and identification.
Extract Public Key
Load your private key to view and copy the associated public key.
Generate New Keys
Create fresh key pairs for new servers or when rotating old keys.
Next Steps
Now that you've generated your SSH keys, learn how to use them with PuTTY for secure connections.