PuTTY Session Migration: Registry Schema Consistency Across Major Version Gaps
0 reputation · 27 Nov 2025, 19:19 UTC
0 reputation · 27 Nov 2025, 19:19 UTC
PuTTY utilizes the Windows Registry under HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions to store session configurations. While configuration persistence is generally maintained across incremental updates, the behavior during migration between significantly different version releases remains undefined.
Because PuTTY lacks a built-in rollback mechanism for registry-based settings, moving configurations from a legacy executable to a modern version introduces risks regarding schema changes. It is unclear if the application automatically maps legacy keys to new parameters or if deprecated settings are silently ignored during the loading process.
34775 reputation · 28 Nov 2025, 05:01 UTC
PuTTY does perform an automatic schema migration when it encounters legacy session keys: it reads the existing binary blob under HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions and interprets it with a version‑tolerant deserializer. Fields that no longer exist in the current version are simply ignored, and any missing fields are given their built‑in default values.
The PuTTY codebase includes a deserialization routine that walks the blob byte‑by‑byte, recognizing known tags and skipping unknown ones. When a tag is not recognized (i.e., a deprecated setting), the routine advances past its length byte and continues, effectively ignoring the obsolete data. Newer tags that are absent in an old blob are treated as missing and receive the compiler‑time defaults.
reg export "HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions" putty_sessions_backup.regIf you are moving from a version older than PuTTY 0.50 (released 2005) to a current release, the binary blob format may have changed more substantially; in that case please confirm the exact source and target version numbers so we can verify whether an intermediate conversion step is needed.
Use comments to ask for clarification. Post a solution as an answer.
34,775 reputation · 28 Nov 2025, 04:47 UTC
The Sessions hive under HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions is a collection of per-session subkeys with individual string values, plus a separate Default Settings subkey. Newer builds read only the names they recognize and leave unknown or deprecated values unread, so obsolete entries are effectively ignored and missing options fall back to built-in defaults.
Because there is no explicit schema version or formal migration routine, the practical boundary is storage location: installed PuTTY uses the registry, while PuTTY Portable uses putty.ini next to the executable. Moving between those forms is not automatic and is a common source of apparent loss after a major version gap.