Suppose you have a .ppk file and you need a .pem file that supports the terminal command. Please follow the below steps to convert the PPK file to PEM format on the Linux terminal using PuTTygen.
Steps for Convertingg PPK to PEM
Step 1: First, you need to install the puTTy tools on your Linux machine using the below command.
sudo apt-get install putty-tools
Step 2: Generate the .ppk file to .pem file using the PuTTygen command-line tool.
puttygen server.ppk -O private-openssh -o server.pem
Step 3: Now you need to change the .pem file permission, set the read-only permission to the owner of this file. It should only be readable by the user that owns it. Remove any permission to groups.
chmod 400 server.pem
Step 4: You can now connect to your remote Linux server with ssh using this .pem key using the below command.
ssh -i server.pem user@hostname
Thanks for reading, feel free to reach out to me for any comments and suggestions. I hope you found the article helpful and you were able to convert .ppk private file to .pem file.