This tutorial will show you how to generate a public/private SSH key pair on a Windows operating system using PuttyGen (PuTTY Key Generator) and then install that on your Netcetera VPS so you can use SSH keys for authenticating.
1. Download the PuTTY installer here.
2. After the files finish downloading, launch the installer and follow the on-screen instructions to install the PuTTY software. The default install location is fine, but I would recommend selecting the following options under the “Select Additional Tasks” screen:
* Create a desktop icon for PuTTY
* Create a Quick Launch icon for PuTTY (current user only)
* Associate .PPK files (PuTTY Private Key) with Pageant and PuTTYgen
3. Once the install is finished, launch PuTTYgen (which can be found in your Start Menu under “PuTTY”)
4. When PuTTYGen launches, you can keep all of the default settings, so you shouldn’t need to change anything (listed below)
* Type of key to generate: SSH-2 RSA
* Number of bits in a generated key: 1024
5. Now, click on the “Generate” button to create your key pair. You will need to move your mouse around within that blank space during that process.
6. Once the generator is complete, you will see a window with your new public key and key fingerprint.
7. Next, feel free to change the “Key comment” to anything you would like. I usually indicate the workstation name in the comment so I know where it came from. Something like “my-workstation-home.”
8. You then need to fill in the “Key passphrase” and the “Confirm passphrase” fields. These are important, make sure you set a passphrase! It should be a secure passphrase and one that is not easily guessable nor should it be used anywhere else.
9. You now need to select the contents of the public key in that large text field and copy the entire contents (control + C) into your clipboard. Do not quit PuTTYGen. Your public key will look similar to the below:
Now, Go back to the Netcetera order form for the VPS and paste it in the "SSH Public Key" section of the order
The public key is what will be put on your VPS server automatically later once created.
10. Go back to PuttyGen and click on the “Save private key” button on the main window under the “Save the generated key” section. You can call that file “privatekey” or “privatekey.ppk” — make sure to save it somewhere you will be able to find.
Remember: the private key remains private and should never be given to anyone. Keep this file safe or else you will need to re-do everything if the private key is ever lost.
11. You should now have a public and private key file saved on your workstation. You can quit out of PuTTYGen now.
12. The next step is to login to your Netcetera VPS via SSH.
13. Launch PuTTY (found under the “PuTTY” section in your Start Menu). In the “Category” section on the left, scroll down and under Connection > SSH, select the “Auth” option. Where it says “Private key file for authentication:” click on the “Browse” button and find the private key you generated previously and click the “Open” button to load it. The text field should now be filled in with the path to your private key.
14. Next, in the “Category” section, select the “Session” option towards the top of that list of options. Fill in the “Host Name” field with your account hostname (your account domain or IP address will also work).
Tip: To save this profile for later so you don’t need to do this each time you connect, type a name for this session in the “Saved Sessions” text field on the lower half of that screen. Then, click on the “Save” button to the right and the session will now be saved for later (it will show up where “Default Settings” is showing). Next time you connect to the server, you would simply select the session you created and then click on the “Load” button, and then select the “Open” button at the bottom to load that saved session.
15. Click the “Open” button and then you will be prompted for your Netcetera VPS account username and then the password. Enter those and then you will be logged in via SSH.