To create a public/private key pair for use in PuTTY
(i.e. OpenSSH and so on) use the following method.
- Get Puttygen
- Start Puttygen, a dialog like this will be displayed:
- Press the “Generate” button:
- Move the mouse in the field as the program requests. You will see the progress bar filling:
- When finished, the following dialog gets displayed:
- Give your public key a useful description in the comment field. E.g. add “
(your-email@server.tld)
” (i.e. your email address) to the text which is already in this edit field. - Optionally choose a passphrase to secure your key. If the storage of the key is safe enough (e.g. TrueCrypt volumes) there is no need for a passphrase.
- Save the private key:
… and give the file a name that makes sense, e.g.username@server_privkey.ppk
.
… and give the file a name that makes sense, e.g.username@server_pubkey.ppk
.- Finally give the public key that you have created to anyone who has requested it. Note, if it is for use in SSH authentication you can simply copy the contents from the field “Public key for pasting into OpenSSH
authorized_keys
file“
No worries, since it is the public key, you can give it to anyone. However, never give your private key away! If you think it has been compromised, notify all users of your public key and arrange an exchange of the public key information!!!
// Oliver