To create & use SSH Keys on Windows, you need to download and install two things:
PuTTY, which is used to connect to remote servers through SSH, and
PuTTYgen, a utility used to create SSH keys.
After that you create and save your own ssh key.
Let's get started!
1. Download Putty & Puttygen
On the PuTTY website, download the
.msifile in the Package files section at the top of the page, under MSI (‘Windows Installer’).
Next, install it on your local computer by double-clicking it and using the installation wizard.
2. Generate an SSH Key
After the programs are installed, start the PuTTYgen program by tapping the Windows key and typing
puttygen. You should see something like this:
You can customize the Parameters at the bottom if you like, but the default values are appropriate in most situations.
When you’re ready, click the Generate button on the right-hand side to start the key generation.
You might be prompted to “generate some randomness by moving the mouse over the blank area”. This randomness (also known as entropy) is used to create keys in a secure fashion so that other people can’t reproduce them.
When the key is generated, you’ll see the public key displayed in a text box. It might be a good idea to copy this directly into your clipboard or a password manager now if you plan to add it to your Genesis Cloud account later.
Be sure to scroll within the text area so you copy the entire key.
Click the Save private key button and select a secure location to keep it. You can name your key whatever you’d like, and the extension
.ppkwill be automatically added.
Please Note: Don't share the private key with anyone, only the public key is meant for sharing.
Note: Working with PuTTY’s Private & Public Key Format
Please take note: The format PuTTYgen uses when it saves the private and public key is incompatible with the OpenSSH
authorized_keysfiles used for SSH key authentication on Linux servers.
If you need to see the public key in the right format after the private key has been saved, either:
Click the Load button
Navigate to the private key and open it.
The public key will be displayed again and you can copy and paste the public key from the text field.
3. Upload your new key to Genesis Cloud
Now that you have your generated key pair saved on your computer and ready to use, you can:
Add your public key to your Genesis Cloud account to be able to embed it in new Compute service on creation.
4. Start a connection with PuTTY
After you've generated the key, uploaded the public key to Genesis Cloud and saved the private key on your machine, you can start a connection with PuTTY.
First, start "PuTTY" (not "PuTTYgen") and insert your instance's public IP address into the field:
After that navigate in the tree on the left to 'Connection' > 'SSH' > 'Auth' > 'Credentials' and browse for your saved private key:
After that, you can click 'Open'. If it's the fist time you make that connection, you'll see a prompt like that:
Click 'Yes', and type in the user name of the instance (for ubuntu instances this is 'ubuntu'). If everything worked, you'll see a window like this: