Problems activating your account? Send notification email to: [email protected]
Host4Fun Budget VPS Hosting
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Convert PuTTY SSH Key Files to Linux Format
How to convert PuTTY (.ppk) SSH key files to Linux format (.pem)

Hello everyone!

This tutorial is going to be a rather brief guide about how to convert SSH key files created with PuTTY (ppk file extension) to the Linux SSH key file format (pem file extension) so that they can be used with the Linux command line SSH client "ssh".

This tutorial will probably be very helpful for everyone who decided to switch to Linux and use the inbuilt tools instead of installing different / additional SSH clients. In this case you are right here. Unfortunately the Linux ssh client doesn't support the ppk format. Hence why a conversion has to be performed.

P.S.: Yes, there is a Linux version of PuTTY that supports the .ppk format. If you are using the Linux version of PuTTY then this tutorial is not for you. Please move along. Nothing to see here. Don't post a reply saying there is a PuTTY version for Linux. No offense!

First of all you will have to install PuTTY tools. The PuTTY tools package is usually called "putty-tools". It contains command line tools from PuTTY that can be used to create ppk SSH keys, read the content (e.g. public key) and convert the format of these keys (what we want to do).

So start a terminal if you're using a Linux distribution with a GUI or if you are already in a terminal just continue with the commands below.

Commands below have to be performed as root or with sudo!

apt-get install putty-tools

yum install putty

dnf install putty

pacman -S putty

Now you can use the PuTTY tool "puttygen" which is the general tool for SSH key creation and management to convert the format.

Run the command below to convert your key and make sure to adjust the key filenames and the path to the keys.

Convert private key:
puttygen /path/to/myprivatekey.ppk -O private-openssh -o /path/to/myprivatekey.pem

Convert publicy key:
puttygen /path/to/myprivatekey.ppk -O public-openssh -o /path/to/mypublickey.pem

If you have a passphrase on your key pair you need to enter your password to allow the converting to proceed.

That's about it! Now you should have .pem files in the folder where your .ppk key files are stored. You can use the .pem files with the Linux ssh client to connect to servers and authenticate yourself. To do so you have to use the -i flag and provide the path to the private key .pem file.

ssh -p22 [email protected] -i /home/user/keys/server1-private.pem


Possibly Related Threads...
Thread Author Replies Views Last Post
  How to backup server your files from rescue mode (with MySQL Backup) youssefbasha 5 197 05-24-2020, 04:15 AM
Last Post: humanpuff69
  Disable Swap and Regain Storage Space on Linux Hidden Refuge 0 412 12-10-2019, 07:56 PM
Last Post: Hidden Refuge
  Setting Up MyBB Forum On a Linux Server ( Ubuntu / Debian ) Rehan 4 560 09-03-2019, 12:55 PM
Last Post: sohamb03
  install ogp agent in linux ubuntu os Khadeer143 2 631 07-10-2019, 04:02 PM
Last Post: Rehan
  Join split files (.001, .002, ...) easily on Linux Hidden Refuge 15 2,464 03-15-2019, 12:04 PM
Last Post: rudra

Forum Jump:

Users browsing this thread: 1 Guest(s)

Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis

About Post4VPS

Post4VPS is a forum/destiny where you can Delploy Your Free VPSs just by the Power of Posts.

We Provide VPSs of many locations like Germany,US,Canada,France,London,etc.

We also Provide VPSs of Both Linux and Windows OS.