Skip to Content

How to Transfer, Migrate, Import, Export PuTTY Session List from Windows to Linux

Problem: How to export / import / migrate / transfer PuTTY sessions list from Windows to Linux.

PuTTY sessions list

Content Summary

Transfer PuTTY sessions list from Windows to Windows
Transfer PuTTY sessions list from Linux to Linux
Transfer PuTTY sessions list from Windows to Linux
Reference

Transfer PuTTY sessions list from Windows to Windows

PuTTY stores the session information in the registry on Windows OS by default.

Export PuTTY sessions list using cmd.exe require elevated prompt
Only sessions: regedit /e "%USERPROFILE%\Desktop\putty-sessions.reg" HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions
All settings: regedit /e "%USERPROFILE%\Desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham

Export PuTTY sessions list using Powershell
Only sessions: reg export HKCU\Software\SimonTatham\PuTTY\Sessions ([Environment]::GetFolderPath("Desktop") + "\putty-sessions.reg")
All settings: reg export HKCU\Software\SimonTatham ([Environment]::GetFolderPath("Desktop") + "\putty.reg")

Import PuTTY sessions list
Double-click on the *.reg file and accept the import.

Import PuTTY sessions list using cmd.exe require elevated command prompt
regedit /i putty-sessions.reg
regedit /i putty.reg

Import PuTTY sessions list using PowerShell
reg import putty-sessions.reg
reg import putty.reg

Note: do not replace SimonTatham with your username.
Note: It will create a reg file on the Desktop of the current user.
Note: It will not export-related SSH keys.

Transfer PuTTY sessions list from Linux to Linux

On Linux / Unix, all PuTTY sessions list profile are stored in: ~/.putty/sessions/ (where ~ represents the user’s home directory)
Each session is a file in that directory, so you can copy the whole directory or just individual sessions.
Note: Private key files are not stored within the session files, so they will also need to be copied from their original location.

Transfer PuTTY sessions list from Windows to Linux

Step 1: Download pwin2lin.pl on Linux.
# wget https://pwin2lin.googlecode.com/files/pwin2lin.pl

Step 2: Install PuTTY on Linux.
# wget http://the.earth.li/~sgtatham/putty/latest/putty-0.63.tar.gz
# tar zxvf putty-0.63.tar.gz
# cd putty-0.63/
# ./configure
# make; make install

Step 3: Export Windows registry containing PuTTY sessions.
E:\Linux>regedit /e "E:\Linux\putty.reg" "HKEY_CURRENT_USER\Software\SimonTatham\PuTTY"

Step 4: Import to Linux.
[oracle@rac01 ~]$ cp /media/sf_Linux/putty.reg .
[oracle@rac01 ~]$ ll putty.reg
-rwxr-x--- 1 oracle dba 15376 Jun 6 21:05 putty.reg
[oracle@rac01 ~]$ ./pwin2lin.pl ./putty.reg ~/.putty
mkdir /home/oracle/.putty
mkdir /home/oracle/.putty/sessions
[oracle@rac01 ~]$ cd .putty/sessions/
[oracle@rac01 sessions]$ ll
total 8
-rw-r--r-- 1 oracle dba 4257 Jun 6 21:06 rac01
[oracle@rac01 sessions]$h

migrate PuTTY sessions list from Win to Linux

Reference

Thinking Out Loud: Migrating Windows PuTTY registry to Linux
superuser: Export putty settings (or sessions) from a Linux to another Linux
StackOverflow: How to export/import PuTTy sessions list?
GitHub: pwin2lin/pwin2lin.pl

    Ads Blocker Image Powered by Code Help Pro

    Your Support Matters...

    We run an independent site that\'s committed to delivering valuable content, but it comes with its challenges. Many of our readers use ad blockers, causing our advertising revenue to decline. Unlike some websites, we haven\'t implemented paywalls to restrict access. Your support can make a significant difference. If you find this website useful and choose to support us, it would greatly secure our future. We appreciate your help. If you\'re currently using an ad blocker, please consider disabling it for our site. Thank you for your understanding and support.