Home / Tutorials / Convert ppk file to a pem file

Convert ppk file to a pem file

I was working on a project in which the existing developers had setup access to their AWS EC2 instances using putty as their ssh client due to them running on Windows 7. They provided the putty private key file they setup but that didn’t do me any good because I was running OS X. Here is a list of steps I took to convert PPK file to a PEM file that I could use to SSH into any EC2 instance.

  • To start you will need either macports or homebrew.
  • if using macports you will run the following command to install putty for mac:

  • if you are using homebrew you will run the following command to install putty:

  • The remaining commands will be the same when using macports or homebrew. To generate the pem file run the following command:


    Keep in mind that you will want to substitute the name of your ppk file in place of the privatekey.ppk name I used. You will also want to change the name of the pem file you want to create rather than using privatekey.pem, unless of course you want to use privatekey.pem.

  • Next you should place the privatekey.pem file in your
    ~/.ssh directory
  • Now, lets set the pem file to have the proper permissions:

That’s it. You now have a valid pem file that you can use to connect to your EC2 instances from your Mac. Below is an example of the command you can now run to connect to your instances:

That’s it for this post, hope this helps someone out in the future. And by someone I most likely mean future me!

About cmadmin

Web Developer & Designer | Android App Developer

Leave a Reply

Your email address will not be published. Required fields are marked *

Login


Username
Create an Account!
Password
Forgot Password? (close)

Sign Up


Username
Email
Password
Confirm Password
Want to Login? (close)

Forget Password?


Username or Email
(close)
%d bloggers like this:
SHARE
OR
SUBSCRIBE
To get latest new / tutorial / technology / development information subscribe with us.
ARE YOU READY? GET IT NOW!
Lets Get Updated with latest trends & tutorials!
Your Information will never be shared with any third party.
Ready for latest tutorials & tools !
OR SUBSCRIBE WITH