Convert ppk file to pem file for accessing AWS EC2 instance using linux terminal

Posted By : Sanjay Saini | 30-May-2015

Hi Friends,

When we are working on a project then every time  we have need to access server from our local system. When we want to connecting from  local system to server  which is a AWS Ec2 Instance .Putty ppk file has been provided to me to connect it by Aws. But We have need to access server using linux terminal via SSH. so we have need to convert ppk file to equivalent pem file.

Steps to  convert that PPK file into an equivalent PEM file that I could use access Ec2 instance on linux terminal via SSH

Step 1: Install the putty tools, if you don`t have on Linux:

sudo apt-get install putty-tools

Step 2 : Generate the pem file run the following command:

puttygen ppkkey.ppk -O private-openssh -o pemkey.pem

Step 3 : Place the pemkey.pem file in your ~/.ssh directory

cp pemkey.pem ~/.ssh

Step 4 : Set the pem file to have the proper permissions

chmod 400 pemkey.pem

Now, we have a pem file that help us to connect to our EC2 instances from Linux. Below is an example:

ssh -i pemkey.pem [email protected] 

Thanks

Please Feel Free to Contact me if you have any further Questions or Concerns.

Sanjay Saini

[email protected]

About Author

Author Image
Sanjay Saini

Sanjay has been working on web application development using frameworks like Java, groovy and grails. He loves listening to music , playing games and going out with friends in free time.

Request for Proposal

Name is required

Comment is required

Sending message..