Generate SSH Key Pair with PuTTYgen
PuTTYgen is an open source and free program which allows the user to generate a public and private key pair.
Download PuTTYgen
Download the latest version of PuTTYgen. After downloading it, double-click it and open it.
Generate the Key Pair
Click the Generate button. You’ll now be told to move your mouse randomly across the blank area in the PuTTYgen window. Do this until the key pair is generated for you.
Adding a Passphrase to the Key
If you don’t set a passphrase, your key will be stored unencrypted on your hard drive. Meaning if someone nefarious gets ahold of it, they’ll be able to log directly into your server(s).
For the comment, I usually put the month and year for mine: sep-2017. You can put your email address, username or whatever you prefer.
Make sure the type is set to RSA and the number of bits is 2048.
Save the Keys
You’ll now have two keys - a public key and a private key.
You’ll upload the public key to any server which you’re trying to access. The private key remains in your possession.