Moving from Windows/PuTTY to Linux, macOS, or AWS? Your .ppk key will not work with OpenSSH as-is β the ssh command needs the PEM format. Converting takes seconds and keeps the same key pair, so nothing on the server side has to change. Here are two ways to do it.
.pem file. The steps below cover both the online tool and puttygen.Step 1 β Locate Your PPK File
Find the .ppk file you use with PuTTY, WinSCP, or Pageant. If you are not sure it is valid or whether it is passphrase-protected, you can inspect it first with the SSH Key Validator, which shows the algorithm, PPK version, and whether encryption is enabled. (New to the formats? See PEM vs PPK.)
Step 2 β Convert to PEM
Option A β Online (recommended):
- Open the PPK β PEM converter.
- Paste the PPK contents or upload the
.ppkfile. - If the key is encrypted, enter its passphrase.
- Click Convert to PEM and download the result.
Option B β Command line with puttygen:
# Install PuTTY tools if needed
# Debian/Ubuntu: sudo apt install putty-tools
# macOS (Homebrew): brew install putty
# Convert PPK to an OpenSSH PEM private key
puttygen key.ppk -O private-openssh -o key.pemStep 3 β Set Correct Permissions
OpenSSH refuses private keys that other users can read, so fix the file mode before using it:
chmod 600 key.pem # standard OpenSSH
# For AWS EC2, use:
chmod 400 key.pem.pem is your secret. Keep it out of git repositories, shared drives, and chat. Store it in ~/.ssh/ and delete stray copies you no longer need.Step 4 β Connect With the PEM Key
# Standard OpenSSH login
ssh -i key.pem user@your-server.com
# AWS EC2 example
ssh -i key.pem ec2-user@203.0.113.10
# Copy a file with scp
scp -i key.pem localfile.txt user@your-server.com:/remote/path/To avoid the -i flag every time, add the key to ~/.ssh/config:
Host myserver
HostName your-server.com
User user
IdentityFile ~/.ssh/key.pemGoing the Other Way
Need to bring an OpenSSH key into PuTTY instead? Use the PEM β PPK converter. And if you would rather start fresh, the SSH Key Generator can produce a key and download it in both formats at once.