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
-
Select:
- Key type: RSA
- Key size: 2048 (recommended)
-
Click Generate
-
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
- Log in to cPanel
- Navigate to:
Security → SSH Access
- Click Manage SSH Keys
- 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
- Back in Manage SSH Keys
- Click Manage next to your key
- 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
- Right-click the Pageant icon
- Click Add Key
- Select your .ppk file
- 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:
- Open PuTTY
- Load your saved session (or create one)
- 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:
- Open Site Manager
- Select your saved connection
- 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.
