Using SSH Keys with PuTTY (Firstserv Guide – Windows)

This guide explains how to set up secure SSH access using public/private keys with PuTTY on Windows.


What Are SSH Keys?

SSH authentication uses two key files:

  • 🔐 Private Key – Stored securely on your computer
  • 🌐 Public Key – Uploaded to your hosting account

👉 Only your private key can authenticate access, making this method far more secure than passwords.


Step 1: Generate SSH Keys with PuTTYgen


Open PuTTYgen

  • Launch PuTTYgen (installed as part of the PuTTY suite)

Generate a Key Pair

  1. Select:

    • Key type: RSA
    • Key size: 2048 (recommended)
  2. Click Generate

  3. Move your mouse randomly over the window to generate randomness

✅ Once complete, your key pair will be created


Set a Passphrase

  • Enter a strong passphrase
  • Confirm it in the second field

⚠️ This protects your private key if it is compromised

👉 Use a mix of:

  • Upper & lowercase letters
  • Numbers
  • Symbols

Save Your Private Key

  • Click Save private key
  • Save the file as:
    yourkey.ppk
    

✅ Keep this file safe—you’ll need it to connect


Copy Your Public Key

  • Select and copy everything from:
    Public key for pasting into OpenSSH authorized_keys file
    

Step 2: Add Your Public Key to cPanel


Upload the Key

  1. Log in to cPanel
  2. Navigate to:
    Security → SSH Access
    
  3. Click Manage SSH Keys
  4. Click Import Key

Paste the Key

  • Paste your public key into the field
  • Give it a name (e.g. mykey)
  • Click Import

Authorize the Key

  1. Back in Manage SSH Keys
  2. Click Manage next to your key
  3. Click Authorize

✅ Your key is now active


Step 3: Load Your Key into Pageant


Open Pageant

  • Launch Pageant (runs in the system tray)

👉 You’ll see a small icon near the clock


Add Your Private Key

  1. Right-click the Pageant icon
  2. Click Add Key
  3. Select your .ppk file
  4. Enter your passphrase

✅ Pageant will now manage your key for SSH connections


Verify Keys (Optional)

  • Right-click Pageant → View Keys

Step 4: Connect via PuTTY

Once your key is loaded:

  1. Open PuTTY
  2. Load your saved session (or create one)
  3. Connect as normal

✅ You will be logged in using your key—no password required


Connection Details

  • Host: yourdomain.com or server hostname
  • Port:
    722
    

Optional: Quick Connect via Pageant

  • Right-click the Pageant icon
  • Select a saved PuTTY session

✅ This connects instantly without opening PuTTY manually


Using SSH Keys with FileZilla (SFTP)

If you already use FileZilla:

  1. Open Site Manager
  2. Select your saved connection
  3. Remove the stored password

✅ With Pageant running, FileZilla will automatically use your SSH key


Security Tips

  • ✅ Always use a strong passphrase
  • ✅ Store your .ppk file securely
  • ❌ Never share your private key
  • ✅ Keep your system protected with a login password

Summary

  • SSH keys provide a secure alternative to passwords
  • Generate keys with PuTTYgen
  • Upload and authorise the public key in cPanel
  • Load your private key with Pageant
  • Connect securely via PuTTY or FileZilla

Need Help?

If you need assistance setting up SSH keys or configuring your connection, the Firstserv support team is always happy to help.

 
 

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Enable Redis on a Premium PCI-DSS compliant plan

Using Redis on Firstserv Hosting What is Redis? Redis (Remote Dictionary Server) is an...

Shell access to your server using SSH (PuTTY for Windows)

Accessing Your Server via SSH (Firstserv Guide) All Firstserv...

Enable or disable SSH (Secure Shell) access

Enabling SSH Access (Firstserv Guide) Firstserv provides secure,...

Connect to MySQL using MySQL Workbench

Connecting to MySQL via SSH Tunnel (Firstserv Guide – MySQL...

Block bad spiders to save bandwidth

Blocking Bad Bots & Search Crawlers (Firstserv Guide) Search...