generating a key pair for openssh in windows

this tutorial uses puttygen, available at the
main putty website. it also works for the
various putty forks like puttytray.

ssh authentication with rsa key pairs works by generating one private key,
which you store somewhere safe on a private pc, and one public key, which you
store in the .ssh directory under your home directory. it is best to generate
a new key pair for every device you use to connect, to protect from loss or
theft.

first click generate.



then wave your mouse around in this little area until the green bar makes it
to the right.



after the keys have been generated, you can either copy and paste the text
from the top box into your authorized_keys file, or save a copy with the
"save public key" button.

next you should encrypt your private key using a password. although this step
is not required, DO IT. notice those are the only caps on the page. if your
key is ever stolen, perhaps one saved to your cell phone for remote access,
someone could wreak havoc on your system long before you have time to notice..



lastly i suggest you save a copy of both your public and private keys. the
private one because you have to anyways, and the public one because when you
close puttygen, you won't be able to retrieve it again. don't save the
private key anywhere people could get ahold of it.



lastly, when you create a new session in putty, navigate to

connection->ssh->auth

and provide the location of your private key file.



when you connect, you will either be asked to provide the password you chose,
or you will be connected immediately. be sure to test it thoroughly before
you disable password authentication in openssh!

o aside
--------
yes, it's possible to use the same private and public key for multiple
machines. don't do it. don't. do. it. you're putting yours (and perhaps
other's) machines at risk.

good luck in the kitchen!

(c) 2015 Alexander Grotewohl
yeah yeah, my name is in caps too