Convert a putty ppk file to a pem file
By Anuket Jain On 18 August 2015 In Linux
Recently, I am working on the AWS project, so I have to access AWS EC2 instance. ppk file was provided me to connect it, But I have to connect it with Linux machine so I required pem file. Now I have to convert the ppk file to pem file. I tried numerous things, google it, but nothing works. Finally I got the solution.
For below Setups of convert ppk file to a pem file.
Install Putty
First we need to install putty on your machine.
# sudo port install putty
# sudo apt-get install putty-tools
# yum install putty
Generate pem file
To generate the pem file run the following command:
# puttygen awsprivatekey.ppk -O private-openssh -o awsprivatekey.pem
Set Pemission
Now, lets set the pem file to have the proper permissions:
# chmod 400 awsprivatekey.pem
Access AWS Server
Now you have a successfully generated pem file that you can use to connect to your EC2 instances. Use following command to connect to your EC2 instances:
# ssh -i awsprivatekey.pem ec2-user@ec2-server-ip
Comments
Thanks for sharing this article, it helped us for moving from windows to linux. 🙂
Happy to know that.