Convert a .ppk private key (Putty) to a base64/pem private key for OpenSSH or OpenSSL
You can convert your Putty private keys (.ppk) to base64 files for OpenSSH or OpenSSL.
With puttygen on Linux/BSD/Unix-like
If you are using the unix cli tool, run the following command:
puttygen my.ppk -O private-openssh -o my.key
You can also generate a public key for your SSH servers using one of the two following commands based on your server:
puttygen my.ppk -O public-openssh -o my.pub
puttygen my.ppk -O public -o my.pub
You private key can be used with OpenSSH or Openssl-based software. The public key can be used with OpenSSH.
Although we recommend using different private keys as much as possible, you can reuse the newly generated key to make a CSR using OpenSSL.
With Puttygen on Windows
- Open Puttygen and click on Load in the Actions section.
- Then, select your PPK file.
- Your key has been imported.
- Then, go to the Conversions menu and select Export OpenSSH key.
- Name your private key and save it.
- In the main window, select Save public
key in the Actions section.
- Name and save your public key.