Background
A client might provide you with a .ppk
file, which is typically used with Putty
and SSH
connections. If, however, you are using Ubuntu or CentOS, you will need the key in .pem
format. This article explains how to quickly convert said .ppk
file to .pem
file.
Steps to convert a .ppk
file to a .pem
file
Follow these simple steps:
sudo apt-get install putty-tools puttygen file.ppk -O private-openssh -o file.pem
Now file.pem
is converted! To use it, remember to change the permissions to r
first and then specify the new .pem
file on the command line when connecting:
chmod 400 file.pem ssh -i file.pem [email protected]
Reference
man puttygen
produces:
puttygen ( keyfile | -t keytype [ -b bits ] )
[ -C new-comment ] [ -P ] [ -q ]
[ -O output-type | -l | -L | -p ]
[ -o output-file ]