We needed puttygen running on an Amazon Linux (Fedora) install that has a broken putty package on yum.
It fails to install because of missing X dependencies.
Honestly, I was a bit glad that it failed or it would have installed a bunch of undesired X dependencies.
Debian based distros have the advantage of having a separate package for the cli tools called putty-tools.
So if you are on Debain/Ubuntu/Mint/etc you can just
sudo apt-get install putty-toolsYou may still want to compile on Debians for other reasons though.
You will obviously need to have some development tools installed.
Things like gcc, make, auto-tools, kernel-headers, etc.
Most distros have a meta-package with the Development Tools.
If anyone knows the exact stuff needed for this, post below please.
# example
cd # go home
mkdir src # make folder
cd src # enter itcurl -O https://the.earth.li/~sgtatham/putty/latest/putty-0.70.tar.gzwget https://the.earth.li/~sgtatham/putty/latest/putty-0.70.tar.gztar xvzf putty-0.70.tar.gz
cd putty-0.70It may complain about missing X-related dependencies, ignore it
./configure # complains about X stuff
make puttygen./puttygen --version
./puttygen --helpThe Makefile and the install-sh scripts do a lot of things that are not needed in this case.
I found it was easier to just copy puttygen since it is self-contained.
sudo cp puttygen /usr/local/bin/puttygen
puttygen --versionYou may change the folder from /usr/local/bin to something else on your $PATH
PS: Not sure if there are other dependecies needed that I already had (eg. openSSL, etc)
You may find this little script usefull to convert PPK certs to PEM
https://gist.github.com/tavinus/931e226aabc913c8b4b5fbd076406b92
It uses puttygen (and is in Portuguese, for now)