Putty Settings Migration

There are few things in this world more frustrating and tiring than having to change PC’s. Throughout my life I started perfecting this “art” in Windows and fortunately today I have programs running that have kept their settings since 5 PC’s ago without a need to reconfigure from scratch.

Putty however, our preferred remote access tool, is a program whose migration I never managed to master. Changing from one PC to another always resulted in having to reconfigure sessions and settings from scratch in a new PC… until today!

My “almost perfect art” of migrating Windows software settings can be summarized by the folder where most of them keep their settings in Windows 7:

  • %HOMEPATH% (C:\Users\<username>)
  • %APPDATA% (C:\Users\<username>\AppData\Roaming)
  • %LOCALAPPDATA% (C:\Users\<username>\AppData\Local)

Where <username> changes according to the user whose settings we need.

But Putty wants to be different and doesn’t keep the settings in these folder or any other folder…NOTHING! Not even in the folder where it runs.

Where does Putty keep its settings?

To show you how to do this migration, lets suppose we have a PC with Putty configured with 3 sessions named: sess01, sess02 e sess03.

Sessoes Putty

Putty keeps all these settings in a “thing” Windows calls the Registry. The Windows Registry is nothing more than…

…   …  I honestly don’t know how to explain! All I know its something very critical to the OS and you better be warned:

Any errors while editing the Windows Registry can cause severe problems to your applications and the operating system. Before any change, make sure you make a backup

The Windows Registry, being a critical system element, requires elevated privileges (meaning administrator rights) to be edited.

To run and see the Windows Registry go to Start, type regedit followed by Yes in the window that follows.

UAC Regedit

The Windows Registry Editor will show up with a hierarchical list of “folders” to the left and a list to the right. The folders are called keys while the lines on the right are called values. The list on the right changes according to the key selected on the left.

Registry Editor

To find the Putty settings we can manually expand to the right key but the quickest way is to find the key named “SimonTatham” with the menu Edit–Find or CTRL+F.

regedit search

The program will find the first key and expanding it you will see “Sessions” with all the configured Putty sessions inside.

Configuração de sessões do Putty no Windows Registry Editor

In the Status Bar, lower part of the window, the full key path is shown:

HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\

Now that the settings are found. How do you migrate?

With the knowledge of the above structure, migration consists of a simple export operation in the source PC followed by an import in the destination one.

Step 1 – Export settings in the source PC

Click the Export option in the right click menu of the “SimonTatham” key. Make sure you right click on “SimonTatham” and not on any other key.

Exportar Configurações do Putty

In the windows that shows up choose a destination file. This is the file that must be moved to the destination PC to be imported.

Step 2 – Import settings to the destination PC

In the destination PC, lets assume a default Putty configuration. Only the “Default Settings” session.

puttydefault

With the file previously exported already on the destination PC all you have to do is double-click on it. A message box will alert you for running the Registry Editor. Just accept it and right after that you will get a new alert:

regedit import

The file is safe. You can click on Yes.

When finished a message box will inform that the import was successful.

regedit import success

Trust me, when the program runs again all the sessions will be there just as they were on the source PC!

Sessões Importadas para o Putty

Imported Sessions in Putty

While this post is focused on Putty, the procedure presented here can be used with other software as long as you know or find out where its settings are stored in the Window Registry. The “Find” feature is the quickest way to get to those settings.

Important Notes

  1. Imported settings are added to the existing settings
  2. When conflicting with existing values, the imported settings take precedence and replace the existing ones
  3. While I recommend a Registry backup, I have never done a restore before. If you believe there will be a need to restore, make sure to research beforehand how to do it properly
  4. I warned you

——–

Inside the Registry
https://technet.microsoft.com/en-us/library/cc750583.aspx

Windows registry information for advanced users
https://support.microsoft.com/en-us/help/256986/windows-registry-information-for-advanced-users

1 Comment Putty Settings Migration

  1. Pingback: VirtualBox: The Quick Solution to “Extension Pack Installer Failed. VERR_ACCESS_DENIED” | Ignorant and Undecided

Leave a Reply

Your email address will not be published.