Convert PEM to PPK file format
Is there a way to convert PEM files to PPK files? (you may guess that Amazon EC2 gives me a PEM file, and I need to use the PPK format for SSH connectivity).
Solution 1:
Use PuTTYGen
Creating and Using SSH Keys
Overview
vCloud Express now has the ability to create SSH Keys for Linux servers. This function will allow the user to create multiple custom keys by selecting the "My Account/Key Management" option. Once the key has been created the user will be required to select the desired SSH Key during the “Create Server” process for Linux.
Create and Use SSH Keys
- Create keys
- Navigate to “My Account”
- Select “Key Management”
- Create New Key.
- During the key creation process you will be prompted to download your private key file in .PEM format. You will not be able to download the private key again as it is not stored in vCloud Express.
- The “Default” checkbox is used for the API.
- Deploy server and select key
-
Connect
- SSH (Mac/Linux)
- Copy .PEM file to the machine from which you are going to connect.
- Make sure permissions on .PEM file are appropriate (chmod 600 file.pem)
- Connect with ssh command: ssh vcloud@ipaddress –i privkey.pem
- Putty (Windows)
- Download Putty and puttygen from - here
- Use puttygen to convert .PEM file to .PPK file.
- Start puttygen and select “Load”
- Select your .PEM file.
- Putty will convert the .PEM format to .PPK format.
- Select “Save Private Key” A passphrase is not required but can be used if additional security is required.
-
Connect with Putty.
- Launch Putty and enter the host IP address. If connecting to the 10.X private address you must first establish an SSL VPN connection.
- Navigate to Connection/SSH/Auth
Click “Browse” and select the .PPK file you exported from puttygen.
Click “Open.” When connection comes up enter username (default is vcloud).
- SSH (Mac/Linux)
Instructions copied from here
Solution 2:
I'm rather shocked that this has not been answered since the solution is very simple.
As mentioned in previous posts, you would not want to convert it using C#, but just once. This is easy to do with PuTTYGen.
- Download your .pem from AWS
- Open PuTTYgen
- Click "Load" on the right side about 3/4 down
- Set the file type to *.*
- Browse to, and Open your .pem file
- PuTTY will auto-detect everything it needs, and you just need to click "Save private key" and you can save your ppk key for use with PuTTY
Enjoy!
Solution 3:
- Download puttygen
- Then open puttygen
- click load
- Set the file type to . all files
- Save PrivateKey
- and then u can just save any name that file became an ppk file
Solution 4:
If you have Linux machine just install puttygen in your system and use use below command to convert the key
pem to ppk use below command:
puttygen keyname -o keyname.ppk
Below command is use to convert ppk to pem not pem to ppk
puttygen filename.ppk -O private-openssh -o filename.pem