PuTTY for win32 storing configuration into file

Ukraine translation by Science Team
Italian translation by Search-SOS
Polish Translation by Coupon machine
Thai Translation
Uzbek translation courtesy of Timur Kadirov
Translation into Portuguese by https://www.homeyou.com/~edu/
French translation


Recently several Antivirus SW have flagged binaries on this site as malware. This is false positive. I do compile binaries myself - first download source code from PuTTY web, overwrite session storing code and compile using Visual Studio. Used PC is clean.

Reason maybe more strict rules and heuristic of AV because of http://www.securityweek.com/attackers-use-trojanized-version-putty-steal-ssh-credentials . I've compiled same code of plink.exe in mode Release and Debug - AV results are vastly different because of vague heuristics match of Release version.

So I've decided to provided binaries compiled in debug mode - hopefully that will be ok for your possibly overcautious AV. The debug mode causes larger executable size - that is ok nowadays - just to explain the difference to original putty.

I fully understand if you do not trust me - feel free to compile the binaries yourself.

PuTTY is a great free telnet/ssh client for Win32 and Unix platforms. It's just one "exe", no install, no extra dlls are required. So it can be run from floppy, usb flash disk etc.

But it stores all configuration into registry ([HKEY_CURRENT_USER\Software\SimonTatham\PuTTY]) - you cannot store/load it from file on the floppy or other removable devices. There is a workaround with bat/reg files but that isn't very nice. So I've rewritten small part of PuTTY (winstore.c - functions which handle storing/loading configuration).

I've rewritten small part of Pageant too, to be able to load list of stored session (winpgnt.c - function update_sessions).

If you find a bug related to storing/loading configuration or not present in original PuTTY feel free to e-mail it to jakub@kotrla.net. My modification to PuTTY is under same licence as PuTTY - you can do anything with it but at your own risk and without any warranty.


This PuTTY stores its configuration (sessions, ssh host keys, random seed file path) to file instead of registry. Every session and ssh host key is stored in a separate file. Default paths are (where . represents executable directory):

Path for saving configuration can be set via file putty.conf. Current working directory is searched first, if putty.conf is not found there, executable directory (same directory as putty/pscp/psftp/plink/pageant.exe) is searched. putty.conf should look like this (if it's not found defaults are used):

		;comment line

You can use enviroment variables in config (like %SYSTEMROOT%) - string will be expanded via ExpandEnviromentString WinAPI function (user-specific variables are not supported yet).

sessionsuffix and keysuffix are optional, defaults are empty. If set, every file has a suffix as defined (saved sessions via sessionsuffix and ssh host keys via keysuffix). Primary purpose is to avoid "*.com" files from names like ssh.domain.com. Both are limited to 15 characters.
Warning: if you already have saved some sessions or ssh host keys and you change these suffixes, you have to manually rename (append them to) all files.

Jumplist is new feature in Windows 7 supported by PuTTY 0.61. Because this PuTTY should be lightweight, if you do not set path to jumplist, none will be created.

This PuTTY is still able to load configuration from registry. Sessions loaded from registry are marked [registry]. When PuTTY is checking ssh host key and it's not found in file but in registry, you can move/copy key to file (or of course do nothing).

Pageant loads list of saved sessions from path set in putty.conf, defaults is ./sessions/packedSessionName - it works the same way as PuTTY (including keysuffix setting).


This PuTTY is still evolving, since the first simple release I've added some features and fixed a few bugs. So I've just started numbering versions. Every future change, feature and bugfix will appear here.


If you find my patch useful, I'll be happy if you say thanks in some other way:


You can get binaries here. If you want to build yourself - download PuTTY source for win32 from PuTTY Download Page and replace winpgnt.c and winstore.c.


Thanks to Sebastian Juerges, Sebastian Królak, Scott Akesson, Przemysław Sztoch, James Hoffman, Jones Down, Harold Hunt, Dmitry Gromov, Gorkum L. van, Kyle Brazell, Sergey Makarenko, Anthony Valentine, Jason K Larson, tzeentch and Quip for testing and ideas.

Last update 23:50, 14. 8. 2017 (GMT +1:00 Prague) - actual with original PuTTY version 0.70