I was playing with Docker yesterday and needed to convert a key that I had been using in Windows with Putty for a while. First attempt with puttygen didn’t work at all, then I found this Stack Overflow post, copying the details here so I know where to find it next time :)

To install the required tools, use

Ubuntu: sudo apt-get install putty-tools
OSX: brew install putty

After the requried tools have been installed, use the following 2 commands to extract the private and public portion of the key:

puttygen id_dsa.ppk -O private-openssh -o id_dsa
puttygen id_dsa.ppk -O public-openssh -o id_dsa.pub

Cobus Bernard

Problem solver, automator, builder