Verdant TCS

Generate SSH Key on Windows with Putty

4 min read

As you get familiar with our platform, you might find that you would like to use SSH and customize your server or use our GPCLI (vCanopy Command Line Interface) to make adjustments to your server. We’ve locked down all SSH access to require a SSH key and only the root user can use SSH.

WARNING

With root access you can do anything, including delete everything. Handle with care.

This article will help you generate and push a key. All you will need is a Windows PC and the following software:

Putty:

32-bit: putty.exe
64-bit: putty.exe

PuttyGen: 

32-bit: puttygen.exe
64-bit: puttygen.exe

Most users are running a 64bit Windows OS, but both should run on your PC. 

If you would rather watch a guide, here is the video, otherwise continue to written guide below: 

Step 1: Launch PuttyGen

Once you download PuttyGen, launch it and click Generate:


It will ask you to move your mouse around to generate the key. 

Step 2: Save the generated key

You’ll need to save three files once your key has been generated, it will also prompt about passphrase. If you choose to do a passphrase, the server will prompt for that passphrase. If you don’t do a passphrase it’ll log you right in with no prompt. 

STEP 2.1 CONVERT TO OPENSSH

First, you want to click conversions and do export OpenSSH key, this is a private key. The OpenSSH key can be used on Linux workstations. More than likely you won’t need it, but it’s worth exporting it now. Save it to a folder of your choice and call it privateopenssh.key or a name of your choice. The private key is sensitive, never share it with anyone and guard it on your machine. 

STEP 2.2 SAVE THE PUBLIC KEY

Next, click save public key button and save it to a folder of your choice, and name it accordingly, OR copy and paste it into notepad from the box at the top – it begins with “ssh-rsa”.

NOTE: If changing the key comment, do not include spaces or special characters.

The public key is what you’ll upload to vCanopy, and doesn’t need to be guarded.

STEP 2.3 SAVE THE PRIVATE KEY

Last, click save private key button, and save that to a folder of your choice. The private key is sensitive, never share it with anyone and guard it on your machine. This one will save as a .ppk file which is used in Putty.

Step 3: Open public.key, copy and add to vCanopy

We now need to copy the public key into your vCanopy account.

STEP 3.1 CHECK THE KEY FORMATTING

Open your public.key with notepad and make sure it’s formatted it correctly:

Be sure that it’s all formatted on one line like in the above above, and NOT formatted like below, or your key will not work. If there is additional line above and below, remove those.

Incorrect:

ssh-rsa 
AAAAB3NzaC1yc2EAAAABJQAAAQEAxznqQ5ic/ctZi1AKS6ysTYo+v3fsADTLup
HqvvtgK0WfFtFYEvdAKjIz1abMXH5srFs6mqDJ56jxtxc9alBnINanKsnYmEzP
3cdcJTREA/BUoShSonXNL3pJs8dtJovldejw6QPB2S2Wnt4FfFOHidwilN15xb
K3PrPqdGyqrmvMkqXRRABfosAzhdLa9t26P9lhcKhEIWmeQipWgjVyNPkkEraa
7HkIPC04t8rjuMtBtHkZ0iv6SqU14d7pODcVR6/nPzm2SqTpDJ8LV8kx1v0ZHo
1k2XYHd6jCB38ns0kjVbPPmFhwUDoLaZa6esKAnJ+SnAc3JExL7Mw1ZtfEjQ==
 rsa-key-20200519

When correctly formatted it will look like below.

Correct:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAxznqQ5ic/ctZi1AKS6ysTYo+v3fsADTLupHqvvtgK0WfFtFYEvdAKjIz1abMXH5srFs6mqDJ56jxtxc9alBnINanKsnYmEzP3cdcJTREA/BUoShSonXNL3pJs8dtJovldejw6QPB2S2Wnt4FfFOHidwilN15xbK3PrPqdGyqrmvMkqXRRABfosAzhdLa9t26P9lhcKhEIWmeQipWgjVyNPkkEraa7HkIPC04t8rjuMtBtHkZ0iv6SqU14d7pODcVR6/nPzm2SqTpDJ8LV8kx1v0ZHo1k2XYHd6jCB38ns0kjVbPPmFhwUDoLaZa6esKAnJ+SnAc3JExL7Mw1ZtfEjQ== rsa-key-20200519

STEP 3.2 COPY YOUR KEY

Once formatted correctly, copy your key.

STEP 3.3 ADD THE KEY TO YOUR vCanopy ACCOUNT

Next, click on your name in the top right, go to your settings in the dropdown, click on SSH Keys on the left menu bar, and then enter your keys details. The name of the key can be anything you would like. Paste the public key in the Public Key section, and then click add key. 

Step 4: Push the key to the server

Click on Home in the vCanopy UI, click on the “key” symbol beside your server, click on available keys, check your key, and then hit Add Keys to Server.

Step 5: Configure putty and connect to server

Open Putty, and go to Auth settings. Click browse and find the private .ppk you saved.

Next click Default Settings, and click save, this will make the key you have selected stay in Putty. After you save, add the server IP, and press connect. It’ll prompt you for login name, type in root and hit enter.



If everything was done correctly, you should see the login prompt.

And that’s all there is to it! From there, you can use our GPCLI, customize files, whatever you would like to do.

Search the Knowledge Base

New to vCanopy?

Get started with our FREE Core plan today! We bring the software, you bring the hardware.