Use PuTTYGen.exe to create a public and private key pair for OpenSSH and PuTTY.
Details:
Run puttygen.exe
Choose the type of key to generate (default is RSA with 2048 bits)
Click on the "Generate" button
Move the mouse within the blank area in order to generate entropy.
Your public ssh key for OpenSSH is displayed in the top box. Copy this when needed to give to an OpenSSH server.
The key comment defaults to showing today's date. You can change it as needed.
I specify a key passphrase (and confirm the passphrase) so that if anyone gets my key then they need my passphrase too for it to be useful to them. You can use the key as is, but it is a lot more fun if you use an SSH Ageant - you only need to tell your ssh ageant your passphrase once per system boot.
Click on save private key to save it.
I myself haven't found the "save public key" button to be useful because it saves the public key in a putty format that is not useful for an OpenSSH server.
The "Load" button can be used to load (and convert) an OpenSSH private key you may have lying around, or can be used to load your private key and change your passphrase (you would then need to click "Save private key" to make the change stick).
Ещё видео!