PuttyDumpConfig

How to dump the Putty configuration into a text file

Putty is the best Windows SSH client on the planet... And it's free!

If, like me, you are constantly connecting to UNIX servers from a Microsoft Windows machine, it is simply a must-have.

But Putty has got a huge problem, one that it shares with oh-so-many Windows application: it stores its configuration, not in an independant file, but in the dreaded Windows Registry. Which makes it hard to keep an independent configuration file for all your machines.

But, here is the (one-liner) solution to dump all the Putty configuration into a text file, thanks to your retarded Windows friend named regedit:

regedit /ea putty.reg HKEY_CURRENT_USER\Software\SimonTatham\PuTTY

With the command shown above, you will find yourself with a text file, that contains all the Putty configuration you have created on your machine.

For instance, here is a short extract of this file:

[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Galactus]
"Present"=dword:00000001
"HostName"="galactus"
"LogFileName"="putty.log"
"LogType"=dword:00000000
"LogFileClash"=dword:ffffffff
"LogFlush"=dword:00000001

Etc... Etc... It goes on like this for miles.

With this dump, it is now possible to import the file named putty.reg into a Windows Registry, by right-clicking on the file and selecting Import in the contextual menu. Simple!

This is also great to quickly import the same configuration on a UNIX machine: I used this to create SSH menus to connect to all the servers at work.

Hope this helps!

See Also: