- 30/05/2020 2:29 AM
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
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
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:
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAhCdDMhGHdaw1uj9MH2xCB4jktwIgm4Al7S8rxvovMJBAuFKkMDd0vW5gpurUAB0PEPkxh6QFoBNazvio7Q03f90tSP9qpJMGwZid9hJEElplW8p43D3DdxXykLays2M8V2viYGLbiXvAbOECzwD4IaviOpylX0PaFznSR4ssXd0= my-workstation-home |
The public key is what will be put on your VPS server automatically later once created.
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.
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.