It is very important to maintain a list of sessions when you are connecting to a lot of VM’s or remote SSH.
There are quite a few reasons why you would want to keep a backup of all your sessions –
- Re-installation of OS
- Moving to another machine
- Sharing with colleagues
Export
Command Prompt (cmd.exe), required elevated prompt
C:\Windows\system32> cd <path-to-reg file>
Only sessions:
regedit /e "%USERPROFILE%\Desktop\putty-sessions.reg" HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
All PuTTy settings:
regedit /e "%USERPROFILE%\Desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham
PowerShell
Only sessions:
reg export HKCU\Software\SimonTatham\PuTTY\Sessions ([Environment]::GetFolderPath("Desktop") + "\putty-sessions.reg")
All PuTTy settings:
reg export HKCU\Software\SimonTatham ([Environment]::GetFolderPath("Desktop") + "\putty.reg")
Import
Double-click on the *.reg file and accept the import.
Alternatively, using a command line option as below:
Command Prompt (cmd.exe), required elevated prompt
regedit /i <path-to-reg file>\putty-sessions.reg
regedit /i <path-to-reg file>\putty.reg
PowerShell
reg import <path-to-reg file>\putty-sessions.reg
reg import <path-to-reg file>\putty.reg