Use puttygen to convert pem to PPK

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.
  • If using MAC you will run the following command to install putty: # sudo port install putty
  • If using Ubuntu run the following command to install putty: # sudo apt-get install putty-tools
  • If using Linux/CentOS run the following command to install putty: # 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:

    Puttygen key conversion

    Puttygen generate PPK

    Puttygen pem to PPK

    Puttygen convert id_rsa to PPK

    Puttygen convert openssh to PPK