Create an SSH Key Using PuTTY (Step-by-Step Guide)
Using SSH keys instead of passwords greatly improves security when connecting to a remote server. If you’re using Windows and prefer PuTTY, you can generate an SSH key pair quickly by following the steps below.
Step 1 — Download and Run PuTTYgen
To begin, download PuTTY or PuTTYgen from the official website:
Step 2 — Generate an SSH Key Pair
Open PuTTYgen and click the Generate button to create a public and private key pair.
Move your mouse inside the window to add randomness during key creation.
Step 3 — Save Your Keys
- Save the private key (.ppk file) — required for authentication
- Save the public key — for server installation
- Optional: Set a key passphrase for added protection
Step 4 — Add the Public Key to Your Server
Copy the public key from the field labeled:
Public key for pasting into OpenSSH authorized_keys file
Then add it to:
~/.ssh/authorized_keys
Step 5 — Configure PuTTY to Use the Private Key
- Open PuTTY
- Go to: Connection → SSH → Auth
- Select your
.ppkfile
Step 6 — Connect to the Server
Enter the server IP address under the Session tab and click Open to start the connection.
Frequently Asked Questions
What is an SSH key?
An SSH key is a cryptographic key pair used to authenticate securely to a remote server without using a password. It consists of a private key (kept on your device) and a public key (stored on the server).
Why should I use SSH keys instead of passwords?
SSH keys are much harder to brute-force than passwords and reduce the risk of credential theft. They are considered a best practice for secure server access.
Can I use the same SSH key on multiple servers?
Yes. You can reuse the same SSH key by adding the public key to the authorized_keys file on each server you want to access.
What happens if I lose my private key?
If you lose your private key and have no backup, you will no longer be able to connect using that key. You will need console or panel access to remove the old key and add a new one.
Do I need a passphrase for my SSH key?
A passphrase is optional but recommended. It encrypts your private key on disk, adding an extra layer of protection if your device is compromised.












