What is PuTTYgen?

PuTTYgen is a key generation utility included with PuTTY. It generates public and private key pairs for SSH authentication.

  • Ed25519 — Modern, fast, and highly secure. Recommended for new deployments.
  • ECDSA — Elliptic curve with NIST P-256, P-384, or P-521 curves.
  • RSA — Classic algorithm. Use 4096 bits for maximum security.
  • DSA — Legacy. Limited to 1024 bits. Not recommended.
💡

Recommendation: Use Ed25519 for new SSH key pairs.

How to Generate SSH Keys

Step 1: Download PuTTYgen

Download puttygen.exe from the download page.

Step 2: Select Key Type

PuTTYgen Settings
Type of key to generate:
  ○ RSA    (2048-16384 bits)
  ○ DSA    (1024 bits only)
  ○ ECDSA  (256/384/521 bits)
  ● Ed25519 (recommended)
  ○ Ed448  (448 bits)

Step 3: Generate the Key Pair

Click "Generate" and move your mouse randomly to create cryptographic randomness.

Step 4: Set a Passphrase

Enter a strong passphrase to encrypt your private key.

⚠️

Security: Never share your private key. Only the public key should be uploaded to servers.

Step 5: Save Your Keys

  • Public key — Copy and add to server's ~/.ssh/authorized_keys
  • Private key — Save as .ppk file

Converting Key Formats

PuTTY (.ppk) → OpenSSH

Command Line
puttygen mykey.ppk -O private-openssh -o id_ed25519
puttygen mykey.ppk -O public-openssh -o id_ed25519.pub

OpenSSH → PuTTY (.ppk)

Command Line
puttygen id_ed25519 -o mykey.ppk

Using SSH Keys with PuTTY

  1. Open PuTTY and enter your server's hostname/IP.
  2. Navigate to Connection → SSH → Auth → Credentials.
  3. Browse for your .ppk private key file.
  4. Save the session and click "Open".

Using Pageant (SSH Agent)

  1. Launch pageant.exe (runs in system tray).
  2. Right-click → "Add Key" → Select .ppk file.
  3. Enter passphrase once. Pageant holds it in memory.
  4. PuTTY automatically uses keys loaded in Pageant.
Download PuTTYgen 📖 Full Documentation