How to generate an SSH key on Windows

Created by Admin at 15-05-2020 11:41:53 +0200

First we open our bash terminal, this will most likely be a program such as MobaXterm or Git Bash. These programs are not installed on Windows by default, so you'll have to download and install on of these terminals first. You'll need a terminal to connect to your Cloud Container later.


Typ in the following command to generate the key:

ssh-keygen -t rsa


You will be asked two questions, one of which is what file to save the key in: you can keep the default file name. Press enter.

You will also be asked for a passphrase. Many people use SSH keys to avoid having to typ in their passwords; However, if your SSH key manages to leak out, which can happen in all sorts of ways, the person who's obtained the key will be able to log in very easily. I recommend using a password, but if you handle these files with extreme caution, it's not absolutely necessary.


After you've answered these questions, two files will be generated. id_rsa and id_rsa.pub, the .pub file is your public key. The server or remote machine will use this file to validate if your personal key fits the public key; the other file is your personal key. 

 

The terminal will tell you where it put the newly generated keys, but you can find these files, in the case of using MobaXterm, inside MobaXterm's home folder: C:\Users\Username\Documents\MobaXterm\home\.ssh

If you're using Git Bash, you can find it in your user's .ssh folder: C:\Users\Username\.ssh

 

Need help configuring your Cloud Container (or server) to use your newly generated SSH key? In this tutorial we expand on adding the key to your container.

Comments

Comments are turned off.