Bill's local machine have existing files:

  • /home/bill/.ssh/id_rsa
  • /home/bill/.ssh/id_rsa.pub

Bill also has a server he wants to connect into.

Is it possible to use the above mentioned key pairs in creating Bill's bill.pem key file?

The bill.pem key file will be used to connect to Bill's server.

Is this possible? If so, how to recycle those existing key pair in generating a new pem/ppk file?

  • Is this your homework?
    – RalfFriedl
    May 24, 2019 at 22:15
  • @RalfFriedl I don't know if your question is a legit one or a trolling one but I intendedly wrote the post in a story-style way. I figured out the answer just now though. May 24, 2019 at 22:39
  • You are allowed to post an answer to your own question, then it's there for others to read.
    – X Tian
    May 31, 2019 at 9:59

1 Answer 1


The .pem/.ppk files are also private key files. In the local machine you simply just have to copy the existing private key file into a .pem file like so:

cp /home/bill/.ssh/id_rsa /path/to/intended/bill.pem

However, for the bill.pem still won't work immediately. The contents of the public key file /home/bill/.ssh/id_rsa.pub must be appended first to the server's authorized_keys file to make the bill.pem work.

Let's say on the server, Bill copied the public key file to


The public key can be appended by doing like so:

cat /home/bgates/downloads/id_rsa.pub >> /home/bgates/.ssh/authorized_keys

Once that's done, Bill can then use the .pem file to access the server like so:

ssh -i /path/to/intended/bill.pem [email protected]

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .