putty-tools
A Linux package that ships PuTTYgen and other PuTTY utilities — most useful for converting OpenSSH .pem keys into the .ppk format required by WinSCP and PuTTY.
What it is
putty-tools is a Linux package that provides the command-line versions of PuTTY utilities, the most relevant being puttygen. PuTTY-based clients on Windows — including WinSCP — use their own private key format (.ppk) instead of the OpenSSH .pem format issued by AWS and most Linux-native tooling. puttygen handles the conversion in both directions: .pem to .ppk for use with WinSCP, and .ppk back to OpenSSH format if needed. On Windows the same tool ships as a GUI application called PuTTYgen, but the Linux package lets you script the conversion without leaving the terminal or touching a Windows machine at all.
Why I use it
Whenever I provision an EC2 instance or hand off server access to someone using WinSCP, the first blocker is always the key format. Rather than firing up a Windows machine and clicking through the PuTTYgen GUI, I convert the key directly on the server or my local Linux machine with a single puttygen command. It takes ten seconds and removes a step that would otherwise require walking someone through a GUI they’ve never seen.
Installation
# Debian / Ubuntu
sudo apt install putty-tools
# RHEL / Rocky / AlmaLinux
sudo dnf install putty
# Arch
sudo pacman -S putty
Common usage
# Convert an AWS .pem key to .ppk (WinSCP / PuTTY compatible)
puttygen key.pem -o key.ppk
# Specify output type explicitly (ppk version 2 for older WinSCP/PuTTY versions)
puttygen key.pem -o key.ppk --ppk-param version:2
# Convert a .ppk key back to OpenSSH private key format
puttygen key.ppk -O private-openssh -o key.pem
# Extract the public key from a .ppk file (OpenSSH authorized_keys format)
puttygen key.ppk -O public-openssh -o key.pub
# Generate a new RSA key pair and save as .ppk directly
puttygen -t rsa -b 4096 -o new-key.ppk
Note: PuTTY version 3
.ppkfiles are the default output in newer releases ofputtygen. If the person receiving the key is on an older version of WinSCP or PuTTY (pre-0.75), pass--ppk-param version:2to produce a v2 file they can open.
Key flags
-o <file>— output file path for the converted key-O <format>— output format:private(ppk),private-openssh,public-openssh,public-rfc4716-t <type>— key type when generating a new key:rsa,dsa,ecdsa,ed25519-b <bits>— key size in bits when generating (e.g.2048,4096)-C <comment>— set a comment on the key (useful for identifying keys later)-P— change the passphrase on an existing key--ppk-param version:2— force output as PPK version 2 for compatibility with older clients