This incantation will back up the registry entries for a user to a file.
regedit /e "%userprofile%\desktop\putty-registry.reg" HKEY_CURRENT_USER\Software\
The "manufacturer is "Simontatham" and is the same on all machines.
This saves the session entries in a Desktop file putty-registry.reg
File names on machine on restore (Merge):
In each Session entry there will be a location for any sessions which have a key file set for SSH preshared key. It is not a good idea to save and transfer the preshared keys between machines, unless they are ones you have generated, and know what you are doing.
"PublicKeyFile" will be the path to the preshared key, and will need to point at the location for the preshared private key file on the new machine. This should be done before merging and restoring onto the machine.
This incantation will allow one to restore them on another machine.
The saved file will need to be located on a drive with a drive letter. Otherwise the restore will not work. Copying the putty-registry.reg file back to the new machine Desktop would be a good way to ensure this (it will be on C:).
Double clicking on the reg file once transferred to the other machine will restore those registry keys, and they should appear on the next invocation of putty.
You can also run regedit (from the run feature of the start menu) and select to import the file.
stackoverflow article method here
cmd.exe, require elevated prompt:
regedit /e "%USERPROFILE%\Desktop\putty-sessions.reg" HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
regedit /e "%USERPROFILE%\Desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham
reg export HKCU\Software\SimonTatham\PuTTY\Sessions ([Environment]::GetFolderPath("Desktop") + "\putty-sessions.reg")
reg export HKCU\Software\SimonTatham ([Environment]::GetFolderPath("Desktop") + "\putty.reg")
ImportDouble-click on the
*.regfile and accept the import.
cmd.exe, require elevated command prompt:
regedit /i putty-sessions.reg regedit /i putty.reg
reg import putty-sessions.reg reg import putty.reg
Note: do not replace
SimonTathamwith your username.
Note: It will create a
regfile on the Desktop of the current user.
Note: It will not export related SSH keys.