Posts tagged with: crashed

Putty: Import settings from old HDD or crashed system

I have had a few times my system crashed on me and I had to re-install Windows. One of the software that I use a lot is Putty. However, migration of configuration information is a PITA in Putty because the data is stored in Windows registry. The problem is worst when you are unable to boot up from your old windows to access the registry. There are a few alternative for this such as Putty manager and Putty mods that store the config in a file. However, I still find myself falling back to using original Putty due to me being accustomed to it. So here is a simple tutorial on how to extract your Putty configuration from an old Windows.

Pre-requisites:

  • your registry file must still be accessible (located in user profiles)

Steps on restoring putty configurations:

  1. On your new Windows run putty once. Then create a dummy configuration server. This is make Putty create a new configuration entry in registry.
  2. Close putty.
  3. Use windows run command (Windows Key + r) to run “regedit“.
  4. Once in registry editor, highlight “HKEY_LOCAL_MACHINE
  5. Then click File -> Load Hive…
  6. A dialog box will ask for the registry file to open. Explore to your old user profile folder. For eg, “C:\Windows.old\Users\myusername\NTUSER.DAT
  7. You will be prompted a name for this key name. Just put anything you like. In this example, we use “old-registry“.
  8. You can now expand HKEY_LOCAL_MACHINE and you will see the key file you just opened under the label  you put in step 7.
  9. Expand as such, HKEY_LOCAL_MACHINE\old-registry\Software\SimonTatham
  10. Now highlight SimonTatham on your left hand side of regedit and right-click then choose export.
  11. Export this registry entry to a file name and location of your choice. I put it in desktop and call it “putty-config“. This file will have the extension of .reg. But those who didn’t enable view extensions will not see it. That is fine.
  12. Now you can unload old-registry from your hive. Make sure “old-registry” is highlighted. Select File -> Unload Hive…
  13. Once you have unload the hive, close regedit.
  14. Use notepad to open up the registry file you just saved. For me, it’s “putty-config“.
  15. Use replace “HKEY_LOCAL_MACHINE\old-registry” with “HKEY_CURRENT_USER“. Click Replace All.
  16. Now save the file and close notepad.
  17. Right click on the “putty-config” file and select “Merge“. This will merge the registry into your new registry.
  18. Open up Putty and voila!!! Your old configurations are all back in Putty including all the session keys.