How to setup SSH Keys – Windows OS
Introduction
Setting up SSH-based security to access your server is a more effective method than using a manual root password. Cracking a system secured with SSH Keys is nearly impossible, as it utilizes encoded keys for robust protection.
About SSH Keys
SSH Keys provide enhanced security against brute-force attacks on a virtual private server. Passwords, no matter how complex, are susceptible to security threats. SSH Keys offer a higher level of security that is safe and highly resistant to attacks. SSH Keys are generated in pairs (public and private keys). The public key can be associated with any server, while only the client with the corresponding private key can access the data.
Data can only be decrypted when the public and private keys match. This inherent design makes SSH highly secure against brute-force attacks. For additional security, you can associate a passphrase with the private key, requiring the user to enter the passphrase to access the private key.
The private key should be safeguarded and must not be shared, unlike the public key.
Setup SSH Keys – Windows
To set up SSH key-based security from your Windows machine, you will need the PuTTY tool for generating the keys.
You can download PuTTY from here.
Note: Make sure to download puttygen.exe specifically — this tool is used to generate SSH key pairs.
Follow these steps to generate SSH Keys using PuTTY:
Step 1 – Launch PuTTYgen key generator
Go to the Windows Start menu, open All Programs, then navigate to PuTTY and launch PuTTYgen.
Step 2 - Select the Parameters
- Type of key to generate: Select RSA.
- Number of bits in a generated key: Specify 2048 or 4096 for higher security

Step 3 – Save Keys
After the key is generated:
- Save public key: Click Save public key (e.g.,
id_rsa.pub) - Save private key: Click Save private key (e.g.,
id_rsa.ppk) - If you're asked to set a passphrase, you can skip it, but it's better to use one for extra security.
- You can also copy the public key from the text box at the top for use in services like GitHub, GitLab, or remote servers