Convert Private Key to PuTTY Format (.ppk) ↔ OpenSSH — desktop.engineer
Convert an OpenSSH private key to PuTTY (.ppk) format and a PuTTY key back to OpenSSH: PuTTYgen commands, OpenSSH vs PuTTY explained.
OpenSSH vs PuTTY: convert private keys both ways
OpenSSH and PuTTY use different private key formats: OpenSSH keys are PEM-style text files (-----BEGIN OPENSSH PRIVATE KEY-----), standard on Linux and macOS, while PuTTY uses its own .ppk format (PuTTY-User-Key-File-2), required by PuTTY and WinSCP on Windows. This guide shows how to convert a private key to PuTTY format and how to convert a PuTTY key back to OpenSSH, with PuTTYgen on Windows and the puttygen command line on Linux.
- Convert private key to PuTTY format (.ppk) on Windows: open PuTTYgen, Conversions → Import key, select your OpenSSH key, then Save private key.
- Convert OpenSSH to PuTTY on the command line: puttygen id_rsa -o id_rsa.ppk (install putty-tools on Linux with sudo apt install putty-tools).
- Convert PuTTY key to OpenSSH: load the .ppk in PuTTYgen, Conversions → Export OpenSSH key — or run puttygen id_rsa.ppk -O private-openssh -o id_rsa.
- Public keys (ssh-rsa, ssh-ed25519...) work with both OpenSSH and PuTTY: only the private key format differs.
Paste your key into the converter above to detect its format automatically and get the exact conversion commands for your direction.
FAQ
How do I convert a private key to PuTTY format?
Import your OpenSSH private key into PuTTYgen (Conversions → Import key), then click Save private key to get a .ppk file. From the command line: puttygen id_rsa -o id_rsa.ppk.
How do I convert a PuTTY key to OpenSSH?
Load the .ppk file in PuTTYgen (File → Load private key), then Conversions → Export OpenSSH key. From the command line: puttygen id_rsa.ppk -O private-openssh -o id_rsa.
What is the difference between OpenSSH and PuTTY key formats?
OpenSSH private keys are PEM-style text files, the default on Linux and macOS. PuTTY uses its own .ppk format (PuTTY-User-Key-File-2), required by PuTTY and WinSCP on Windows. Convert between them with PuTTYgen.
What does "PuTTY key format too new" mean?
Your .ppk file was saved by a newer PuTTYgen than the PuTTY release trying to read it. Update PuTTY to the latest version, which reads every .ppk version, or re-export the key with a PuTTYgen matching your PuTTY release.
Is there a free online PuTTY key converter?
Yes — the converter above detects OpenSSH and .ppk formats automatically and gives you the exact PuTTYgen commands for both directions. It runs entirely in your browser, so your private key never leaves your machine.
All tools