Convert Amazon .pem key to Putty .ppk key Linux
Using the GUI
See this SO Q&A on how to do exactly what you want, titled: Convert PEM to PPK file format.
excerpt
- Download your .pem from AWS
- Open PuTTYgen, select Type of key to generate as: SSH-2 RSA
- 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
Using the command line
If on the other hand you'd like to convert a .pem
to .ppk
file via the command line tool puttygen
, I did come across this solution on SO in this Q&A titled:
- How to convert SSH keypairs generated using PuttyGen(Windows) into key-pairs used by ssh-agent and KeyChain(Linux).
excerpt
$ puttygen keyfile.pem -O private -o avdev.ppk
For the public key:
$ puttygen keyfile.pem -L
References
- Converting Your Private Key (Putty)
If you are using GNU/Linux, you don't have to use Putty. That part of the tutorial is geared towards Windows users.
Just set your .pem
file permissions to r--
by doing chmod 400 mykey.pem
then you can pass it straight to ssh :
ssh -i mykey.pem [email protected]