With * nix version of PuTTYgen:
puttygen mykey.pem -o mykey.ppk
See the PuTTYgen man page .
For Windows users: Please note that PuTTYgen for Windows does not support command-line key conversions.
You can use WinSCP with the /keygen command line instead to convert the key , for example:
winscp.com /keygen mykey.pem /output=mykey.ppk
For compatibility with PuTTYgen, WinSCP also supports its syntax:
winscp.com /keygen mykey.pem -o mykey.ppk
source share