How to Transfer PuTTY Sessions To Another Windows Machine

This is an user contributed article.

PuTTY is a terminal emulator application which can act as a client for the SSH, Telnet, rlogin, and raw TCP computing protocols. You can use putty for remote login or to control your router connected via serial devices.

By default PuTTY stores the session information in the registry on Windows machine. If you have several PuTTY sessions stored in one laptop and would like to transfer those sessions to another laptop, you need to transfer HKEY_CURRENT_USER\Software\SimonTatham registry key and value as explained below:

Export the PuTTY registry key on source windows machine

Click on Start -> Run -> and enter the following regedit command in the run dialog box, which will place the PuTTY registry key and value on your desktop in the putty-registry.reg file. Please note that the name of the registry key (Simon Thatham) is the author of PuTTY.

regedit /e "%userprofile%\desktop\putty-registry.reg" HKEY_CURRENT_USER\Software\Simontatham

You can also launch the registry and interactively export the registry key value as shown below. Click on Start -> Run -> regedit -> Click File menu -> Click Export menu-item -> Enter HKEY_CURRENT_USER\Software\Simontatham in the “Selected branch” -> Save the putty-registry.reg to your desktop.

Import the PuTTY registry key on destination windows machine

Transfer the putty-registry.reg to the destination Windows machine. Right click on the .reg file and select Merge as shown below. This will display a confirmation message: Are you sure you want to add the information in putty-registry.reg to registry?. Click on ‘Yes’ to accept this message.

Launch the putty to verify the new sessions are transferred successfully. The registry key merge will not delete the previous PuTTY sessions. Instead, it will merge the entries to the existing PuTTY sessions on the destination windows machine.

You can also import the registry key and value interactively: Click on Start -> Run -> regedit -> Click File menu -> Click Import menu-item ->select the putty-registry.reg -> click on Import, to import the PuTTY sessions to the destination windows machine.

Turbocharge PuTTY with 12 Powerful Add-Ons explains about some modified versions of the PuTTY that stores the session information in a file instead of Windows registry.


🐧 Please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
30 comments… add one
  • Parameshwaran Jun 14, 2017 @ 11:39

    Thanks a lot. Working as charm

  • Cs Feb 27, 2017 @ 10:30

    Worked also on Windows 10! (both, source & destination)

    Thanks!

  • dave Oct 7, 2016 @ 15:35

    How would you pull this info off it the drive was no longer bootable but still worked when plugged in to the a new system?

  • Prakash Apr 29, 2016 @ 13:17

    Thanks a lot for this information.

  • Amit Feb 23, 2016 @ 10:50

    It saved my manual effort to recreate all configs. Thanks a lot

  • Farhad Ahmed Jan 21, 2016 @ 5:13

    Great Script indeed !! Thanks a lot ..

  • Prabhu Venkata Nov 19, 2015 @ 18:15

    THanks a lot. This helped me. I was able to transfer all the session information.

  • David Nov 12, 2015 @ 3:14

    Worked for me on windows 8.1 without issues

  • JZ Aug 21, 2015 @ 16:39

    thank you so much for sharing, it saves me a lot of time to recreate ssh connections.

  • Peter Steier Feb 23, 2015 @ 23:00

    It is completely weird to store the sessions in the windows registry and not in a simple file. The easiest way is to set up everything new from scratch.

  • Vincent Jan 23, 2015 @ 11:47

    Worked great, thanks!

  • Jason Dec 10, 2014 @ 20:07

    I Do not recommend attempting this at all. Made two attempts on two separate machines and both had to have their OS re-installed due to corruption within the registry.

    This is why messing with the registry is dangerous and not a good idea.

    • ZeWaren Dec 22, 2014 @ 18:57

      If you’re afraid of registry corruption, you should create a new system user, give it the permissions to edit only Putty’s part of the registry and run your scripts with it.

      Never run with admin rights something that dives into the registry.

    • j.dillinger Nov 11, 2015 @ 17:14

      n3wb.

  • annonimous Dec 3, 2014 @ 21:26

    worked for me. thank you!

  • annonimous Dec 3, 2014 @ 21:25

    worked for me

  • GeorgeHuebschman May 28, 2014 @ 18:00

    Will I be able to merge the registry info from my old XP machine to my new Win7 installation?

  • Jason May 6, 2014 @ 14:25

    I need to present the current sessionlist to any user that subsequently log on to the computer. So far I havn’t had luck putting sessions into a “default user” profile. New users are not local admins.
    Any ideas?

  • wombat Sep 13, 2013 @ 19:04

    Worked perfectly, thank you for your post.

  • brijesh Feb 27, 2013 @ 21:20

    thanks lot

  • thangavignesh Nov 27, 2012 @ 8:42

    Thanks it helps for me

  • ZeWaren / Erwan Martin Oct 9, 2012 @ 16:26

    On x64, regedit usually runs as Administrator (or whichever privileged user you configured), so HKEY_CURRENT_USER does not represent the user you are logged in with (unless it IS Administrator of course).

    To export or import my putty registry files, I use the REG command line (which does not require UAC elevation):

    C:somewhereonahost> REG EXPORT HKCUSoftwareSimonTathamPuTTYSessions putty_sessions.reg
    C:onanotherhost> REG IMPORT putty_sessions.reg

  • Pete Pete Aug 29, 2012 @ 8:37

    Hi,

    I’d need a bit help to create a putty entries.
    I have to connect to a lots of different databases(on different hosts) and i like to store them. (database name -> host name). Only type the database name to the host field and it connect to the right host.
    How could i sotre the database names and merge them to the appropriate host names?

    Thank You in advnace
    Pete

  • Miles Jul 3, 2012 @ 15:11

    Just had a “new” windows baseline (WinXP) installed on my machine at work, and using putty .60. I exported and imported my putty registry settings using the regedit GUI as shown above, and I can see them in the registry HKEY_CURRENT_USER => software => SimonTatham => Putty => Sessions, but when I run the putty.exe, there are no saved sessions. Anyone know how to make them appear? Thanks in advance…

  • sudheer Jun 8, 2012 @ 18:47

    All session transferred successfully with no issue.. Thanks a lot

  • Ian Jun 22, 2011 @ 13:23

    What is the regedit command line to import/add the .reg file, rather than using the windows gui as described?

  • User User Mar 17, 2011 @ 16:21

    If you open the file putty.conf from Program files (x86) directory, you will see:
    ;Xming putty.conf
    sshk&sess=%APPDATA%Portable PuTTY

    It is the place to find sessions and ssh’s…

  • Sacramento Photographer Jun 2, 2010 @ 18:34

    Unfortunately the command line tool doesn’t work in Vista 64 bit. The data is still there, and simple to export though. The path on my Vista machine ended up being:

    HKEY_USERSS-1-5-21-1874068349-1688302950-636360099-36883SoftwareSimonTathamPuTTYSessions

    I’d recommend just using the find utility and searching for SimonTatham 🙂

  • dot22 Sep 10, 2008 @ 10:16

    I prefer to use a portable putty
    http://portableapps.com/apps/internet/putty_portable

  • ffk Sep 9, 2008 @ 18:35

    Don’t forget about x64 – the registry path is different!

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @ webmaster@cyberciti.biz