Converting Putty keys to OpenSSH

- [1 min read]

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 required 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

comments powered by Disqus