Puttygen save openssh public key

These instructions apply to the PuTTY client on Windows. Help is also available through Start > All Programs > PuTTY >

Step 1

Generate a public/private key pair on your local desktop. From the Start menu, run Start > All Programs > PuTTY > PuTTYgen as illustrated below. Fig. 1 Initial PuTTYgen window. Click the Generate button. You will be prompted to move the mouse over the blank area to generate some randomness. Do so. Shortly thereafter, the program will generate the key and display the result (see Figure 2). Fig. 2 After keys have been generated. Select all of the text in the box labeled "Public key for pasting into OpenSSH authorized_keys file" (near the top of the window) by dragging the cursor. Right-click over the selection and choose Copy. Finally, click the "Save private key" button to save the private key to a file (Figure 3). The private key must be kept secret. Accordingly, the contents of the file are encrypted using the passphrase, and you should pick a file location that is accessible only to you. You can recover the public key from the private key with PuTTYgen by clicking the Load button. You can not recover the private key from the public key however.

Step 2

Install the public key on the remote host to which you want to connect. Do this by pasting the public key from the Clipboard into the the authorized_keys file, which is located in the .ssh directory in your home directory on the remote host. Figure 3 shows the vi editor being used for this purpose. Fig. 4 Editing .ssh/authorized_keys with vi. Type G on the keyboard to go to the end of the file. Enter insert mode on a new line by typing an o (lowercase oh), then right-click to paste the public key. The result is shown in Figure 4. Fig. 5 After pasting the public key. Press the Esc key to exit insert mode. And finally, type :wq to save the changes to the file and exit the editor. Repeat this procedure to install the same public key on as many additional remote hosts as you like. The private key is not installed on any remote host.

Puttygen public key

Puttygen import public key

Puttygen generate public key

Puttygen SSH public key

Puttygen openssh public key