How to Change Private Key Format to Use with PuTTY

This guide will show you how to change your private key format, to use with PuTTY, which is a Secure Shell (SSH) client for Windows that can connect to a remote machine. If you're using SSH on Linux, then this tutorial isn't for you. PuTTY doesn't support the SSH private key format created by OpenSSH on Linux Operating Systems, so you have to convert the private key to the PuTTY required format. To connect to a remote machine with PuTTY, your private key should have a ppk format.

Prerequisite:

  • Windows
  • PuTTY
  • Private Key

Procedures:

  1. Download and install PuTTY
  2. Make a copy of your private key just in case you lose it when changing the format.
  3. From the Start menu, go to All Programs then PuTTY and then PuTTYgen and run the PuTTYgen program.
  4. In the Parameters section, for the "Type of Key to generate:", select "SSH-2 RSA" and for "Number of bits in a generated key:", leave the default value of "2048". You can change the default value depending on your configuration.
  5. Click Load.
  6. Change the "PuTTY Private Key Files (*.ppk)" drop-down menu option to "All Files (*.*)".
  7. Find and select the Private Key file, then click "Open".
  8. A PuTTYgen information notice message dialog will pop up, click OK.
  9. Change the key comment from imported-openssh-key to something meaningful. This comment appears on your PuTTY screen when you connect to your server.
  10. Click "Save Private Key", and in the PuTTYgen Warning dialog box, click Yes.
  11. Choose a name for the key for example putty_Key.ppk file and save as type .ppk (PuTTY Private Key Files), by entering the .ppk extension. This ensures that you aren't overwriting the original private key.
  12. Click Save, close the PuTTY Key Generator window and remember the location of the private key file for future use.

Congratulations, you have successfully converted your private key from OpenSSH format to PuTTY format.

Was this article helpful?

0 out of 0 liked this article

Still need help? Message Us