Some hosting provided ppk file to access the terminal of the server but we need pem file to connect with the server from the Ubuntu machine.
SO in this article, I will explain to you a list of commands to convert ppk file to pem file using ubuntu commands.
How to Convert PPK to PEM in Linux
please run the following command to install packages to convert ppk to a pem file.
- Step 1 – install the putty tools on your Linux system using the below command.
sudo apt-get install putty-tools
- Step 2 – Now go to ppk file directory and give the name of ppk file and new pem file to , convert the ppk file to pem file using puttygen command-line tool.
puttygen your-server-key.ppk -O private-openssh -o new-server-key.pem
- Step 3 – Change the .pem file permissions
chmod 400 new-server-key.pem
- Step 4 – Finally, connect to your remote server with ssh using this pem key.
ssh -i new-server-key.pem root@remote-ip
How to connect to the terminal using PPK/PEM in Windows
If you are using a window machine and you need to connect to server ssh/terminal then you ned to download the putty for the window machine.
You can select pem/ppk file from settings and connect to server terminal.