How do I create an SSH public key for a Windows PC?

There are three main ways to generate a public key in Windows. We've tried them all with Windows 7, but given the PuTTY tools are most popular, they are documented first. Whichever method you choose, email your generated key to your designated manager and they will notify you when your account has been created. Note, if you have multiple keys because you have multiple machines, or perhaps you have different keys for different software, send them all to us - we can set you up with as many keys as you want bound to your Code Enigma account.

PuTTY

This is a Free Open Source Software (FOSS) solution for Windows that allows Windows users to generate SSH keys and use them to access Linux servers via an SSH connection.

[1] Download and run the PuTTY "Installer" from this page:

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

[2] Generate a private and public key pair:

  • Go to the Windows Start menu -> All Programs -> PuTTY and open PuTTYgen
  • Click the 'Generate' button and PuTTYgen will ask you to make some random movement with your mouse until it has enough random data to generate a secure key for you
  • Click the 'Save private key' button and save the resulting file somewhere safe and only accessible by you!

[3] Export Public key to the Linux server:

In the grey box at the top, entitled 'Public key for pasting into OpenSSH authorized_keys file', there will be a string of nonsense. Copy all of this string into an email and send it to us, as per the opening instruction on this page.

That's it, you're done!

Git Bash

This is a light-weight terminal client for using Git from the command line on Windows. It's a sort of scaled down version of CygWin, and one of the nice things about it is it permits normal 'Terminal' access to Linux servers.

[1] Download and run the latest version from this page:

https://git-for-windows.github.io/

The installer will open msysGit when it completes, follow the instruction to create a shortcut:

/share/msysGit/add-shortcut.tcl Desktop

[2] Generate a private and public key pair:

Follow steps 1 and 2 of the GitHub instructions found here:

https://help.github.com/articles/generating-ssh-keys#platform-windows

At step 3, use the 'clip' command as instructed, but paste the result into an email and send it.

Bitvise

If none of the above works, there's also Bitvise, which is not FOSS, but is freely available for personal use, and even individual use within an organisation, so it's a good and legal option.

[1] Download the Bitvise SSH client software:

http://www.bitvise.com/download-area

[2] Generate a private and public key pair:

  • click the link titled 'User keypair manager' in the Login tab;
  • click the button [Generate New ...];
  • choose ssh-rsa and 1024bits;
  • you can enter passphrase or leave it empty
  • click the button [Generate]

This passphrase is not sent to the remote host, and it is only used to protect your private key. Otherwise, anyone who has access to your private key can authenticate to your account automatically.

[3] Export Public key to the Linux server:

  • Go to the  'User keypair manager';
  • click the keypair in the slots;
  • click the button [Export];
  • chose "Export public key" and "OpenSSH format";
  • click the button [Export];

The result should look something like:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAo8q0r4d599buYHCbc36ViJniRuLvUr++asdSUh

Email just this public part to Code Enigma, as per instructions.