Convert a PuTTY key to OpenSSH
Drop a .ppk file here or paste its contents, and get the same key in the format OpenSSH reads, for ssh, scp, git and everything else that looks in ~/.ssh. It works the other way too: give it an OpenSSH private key and it writes a .ppk for PuTTY, version 3 or 2.
The conversion runs in this tab, in WebAssembly compiled from Conchshell's own Rust code: the same PuTTY key parser the app uses. The page fetches that converter as it opens, before you paste anything, and after that it makes no requests at all.
Your key
Only if the key has one.
Optional. Empty means the result is not encrypted.
The key and its passphrase are read and converted in this tab. The page's only requests are for its own converter, one script and one WebAssembly file, made as it opens; its code has no other fetch, no XMLHttpRequest and no form submission, and the page carries no analytics. Everything you typed is cleared when you leave the page.
Result
Private key
Copied.
Public key
Copied.
- Fingerprint
The same SHA256 fingerprint ssh-keygen -lf and PuTTYgen show for this key: converting does not change the key.
How to use it
- Drop the
.ppkonto the box above, choose it with the file button, or paste its text. The line under the box says what the page found: format, version, whether the key is encrypted, and its type. - If the key is encrypted, type its passphrase. It is used to decrypt the key in this tab and is not kept.
- Check the direction. A
.ppkis converted to OpenSSH, and an OpenSSH key to a version 3.ppk, unless you pick otherwise. - Optionally set a new passphrase for the result. Leave both fields empty to get an unencrypted key.
- Download the private key and the
.pubfile. For OpenSSH, save the private key as~/.ssh/id_ed25519(orid_rsa,id_ecdsa) and runchmod 600on it: OpenSSH refuses a private key that other users can read.
The same thing with PuTTYgen on your own machine, if you have it (Homebrew's putty on macOS, putty-tools on Debian and Ubuntu):
puttygen key.ppk -O private-openssh-new -o ~/.ssh/id_ed25519
puttygen ~/.ssh/id_ed25519 -o key.ppk
In PuTTYgen on Windows it is the Conversions menu: load the key, then Export OpenSSH key (force new file format), or Import key to go the other way.
Questions people actually ask
Why would I need to convert a .ppk?
OpenSSH, which is the ssh command on macOS, Linux and current Windows, and everything built on it, such as git, scp, rsync and VS Code Remote-SSH, reads only its own key formats. A key made in PuTTYgen is a .ppk, so moving to a terminal means converting it once. PuTTY and Pageant need the reverse: they load .ppk files only.
What is the difference between PPK and OpenSSH formats?
The key inside is the same; the container differs. A .ppk is a text file with named headers, the public and private parts in base64, and a MAC over both. Version 2 turns the passphrase into the encryption key with SHA-1; version 3, introduced in PuTTY 0.75, uses Argon2 and an HMAC-SHA-256. An OpenSSH key is one base64 block starting with BEGIN OPENSSH PRIVATE KEY; with a passphrase, OpenSSH derives the key with bcrypt-pbkdf and encrypts with AES-256-CTR, and this page encrypts the same way.
Does converting change the key?
No. It is the same key pair in a different file: the public key and its SHA256 fingerprint stay the same, so servers that already have the key in authorized_keys keep accepting it. The page shows the fingerprint so you can compare it with ssh-keygen -lf or PuTTYgen.
Is it safe to paste a private key into a web page?
Only if the page never sends it anywhere, and that should be something you can check rather than take on trust. Here the conversion runs in your browser: the page fetches its converter as it opens, before you paste anything, and makes no requests after that, so you can keep the Network tab open while you convert. The page carries no analytics and clears its fields when you leave it. If you would rather not give a private key to any web page, the puttygen commands above do the same on your own machine.
Which keys does it handle?
PuTTY .ppk versions 2 and 3, unencrypted or encrypted, including Argon2id, Argon2i and Argon2d key derivation, and OpenSSH private keys in the current format, encrypted or not. Key types: Ed25519, RSA, and ECDSA on P-256, P-384 and P-521. It refuses DSA, which OpenSSH removed in version 10.0; Ed448, which OpenSSH does not support; hardware security keys (sk-), whose private half never leaves the device; and older PEM files that begin with BEGIN RSA PRIVATE KEY or BEGIN PRIVATE KEY.
Do I need to convert keys for Conchshell?
No. Conchshell has opened .ppk files directly since version 2.15, versions 2 and 3, encrypted or not, and it reads them with the same parser this page runs. This page is for the other programs on your machine.
How it is tested
Against the two programs that define the formats. Every key this page writes in OpenSSH format is read back by ssh-keygen, and must give the public key that was in the .ppk. Every .ppk it writes is loaded in full by PuTTYgen 0.84, which checks the MAC and decrypts it. For an unencrypted key, and for an encrypted one given the same salt and Argon2 settings, the .ppk it writes is byte for byte the file PuTTYgen writes.
The test keys are the ones Conchshell's own PPK parser is tested on, plus keys made by PuTTYgen and ssh-keygen for every supported type, with and without a passphrase. That testing caught one real bug on the way: in about one P-521 key in four that ssh-keygen makes, the private number is stored shorter than full length, and the Rust library underneath refused those keys as damaged. The page works around it.
Where this comes from
Conchshell is an SSH, SFTP, FTPS and RDP client for macOS, Windows, Linux and Android. It reads PuTTY keys itself, so people moving from Windows can bring their .ppk as it is and point a connection at it. The parser this page runs is that code, compiled to WebAssembly.
The application is free. One feature is paid: syncing saved connections between your own machines, $19 once.
Read next
- Check an SSH public key — type, real size and fingerprint, graded
- Check your ~/.ssh/config — ciphers, MACs, key exchange and host-key settings
- Leaving PuTTY — what carries over and what stays behind
- All tools
- Download