Backup PuTTY settings and sessions to another copy of PuTTY

How to Back Up and Copy PuTTY Sessions & Settings to Another PC

Last updated on | 9 replies

Introduction

Do you frequently use PuTTY to manage remote servers over SSH? If you’re switching to a new computer or just want to safeguard your settings, you can back up your existing PuTTY sessions and quickly import them elsewhere. This guide covers how to export PuTTY settings from the Windows Registry and safely import them to another PC running Windows 10 or Windows 11.

Windows Command Prompt

Firstly, make sure that all PuTTY windows are closed.

We can use Windows Command Prompt (regular or administrative mode) to easily export keys from the Windows Registry. However, if you elevate privileges with a different user account, you might end up exporting the registry hive for that admin user instead of your own. If you are logged in as the same user that installed PuTTY, consider using a non-administrative command prompt to ensure you export from HKEY_CURRENT_USER for your profile. If Windows requests permission to proceed, just click “Yes” in the popup dialog.

In Windows 10 or Windows 11, open the Start Menu and type cmd. You can either press Enter to open a normal command prompt or right-click on the Command Prompt icon and click Run as Administrator (if you’re sure you want that mode). Make sure you use the same user account that originally configured PuTTY.

How to open Windows command prompt (CMD) in administrative mode

Export PuTTY Settings and Sessions

If you want to export all PuTTY settings (including sessions), run the following command in the Command Prompt:

regedit /e "%USERPROFILE%\Desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham

A file putty.reg should now be on your Desktop.

If you prefer an automated backup, you can place the above command in a .bat file. For example:

@echo off
echo Exporting PuTTY registry settings...
regedit /e "%USERPROFILE%\Desktop\putty.reg" HKEY_CURRENT_USER\Software\SimonTatham
echo Backup complete! File saved to Desktop.

Double-click this .bat file whenever you want to create a fresh backup of your PuTTY settings.

Export PuTTY Sessions Only

If you only want to export PuTTY sessions, run:

regedit /e "%USERPROFILE%\Desktop\putty-sessions.reg" HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions

A file putty-sessions.reg should now be on your Desktop. (Note that SSH keys are not stored in the registry, so you will have to copy these manually if you have any.)

Importing PuTTY Settings and Sessions to Another PC

Make sure that PuTTY is closed before importing registry keys. Simply double-click the .reg file to import it into your registry. It’s that simple!

If You Use KiTTY (PuTTY Fork)

For those who use KiTTY, the popular PuTTY fork, the registry path changes from HKEY_CURRENT_USER\Software\SimonTatham to HKEY_CURRENT_USER\Software\9bis. The rest of the process (export, import, etc.) remains the same.

Conclusion

That’s it! You’ve successfully transferred your PuTTY settings and sessions to another PC. Keep a backup of your .reg files in a secure location (like cloud storage) for future use, and don’t forget to manually copy over any SSH keys you rely on. If you found this helpful, consider exploring more of our articles for additional Windows, Linux, and remote server management tips!

Visitor Feedback and Tips

Tip #1: If you are logged into Windows as one user but running Command Prompt as a different user (to elevate privileges), you may export the wrong hive. It’s safer to export from a normal (non-admin) command prompt if the PuTTY settings belong to your current user account. Windows will typically prompt for permission.

Tip #2: Avoid running everything as administrator unless needed. It’s better from a security standpoint to run at the lowest privilege level possible.

Tip #3: If you’re missing sessions after import, verify you used the same user profile (and not the admin user’s profile). Also confirm that you ran the .reg import as the correct Windows account.

Tip #4: If you use KiTTY (PuTTY fork), your registry folder is 9bis instead of SimonTatham.

While You’re Still Here..

I’ve written a few articles and guides related to PuTTY that might be of interest:

Let me know if this helped. Follow me on Twitter, Facebook and YouTube, or 🍊 buy me a smoothie.

9 replies

Leave a reply

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

  1. great guide !
    do you happen to have a small script or bat file that could live in a folder and when I double click it will do the backup/export of the settings ?

    or what would that script look like ?
    cheers !

  2. A helpful reminder one where to find the Putty values. One tip: use a normal, NON-administrative command prompt to export values from the HKEY_CURRENT_USER hive. If like me, you must use a different username to elevate privileges, you’ll be exporting the hive of that user–which in my case was empty. Similarly, import without elevation.

    1. Great tip.

      Just to clarify for other readers: When you run this in a regular (non-admin) command prompt, Windows will pop up a graphical dialog requesting permission to proceed. (Tested in Win 10.)

      In addition to Mark’s point about the identity of the current user, this approach is technically a better security practice than doing things at an admin prompt when not required.

  3. For Kitty, the Putty fork, the Windows registry name changes from SimonTatham to 9bis. The rest of the how-to remains the same.

  4. I hope you can help….I have been using version .53b for quite some time. However I recently had to download version 73 for use on a Linux server which needed specific puTTY settings. So both versions are now running on my laptop. I also have all sessions running on both versions. HOWEVER…on .53b, using the more command. the file contents are simply displayed on the screen, I press ‘Enter’ and I am returned to the UNIX prompt leaving the file contents displayed. On .73, I connect to same server, type same ‘more’ command for same small file, first the screen is cleared, contents are displayed, I press ‘Enter’, then screen is cleared again and I am returned to UNIX prompt, but contents are not visible anymore.
    Just the ‘more’ command syntax I typed. Which setting within .73 controls that?
    Or can I transfer all .53b settings over to .73 version?

    1. I think this is probably an artifact of the TERMCAP entry, but I am not sure. If you connect with both and do an ‘echo $TERM’ do they match? If not, can you set the .73 connection to the same as the .53b and see if that makes the problem better. ie: ‘export TERM=xterm’ or whatever the .53b version has.

      In either case, your version of more might actually be using less under the hood. You can control both of their behavior about clearing the terminal on exit using “export LESS=’-X'” in your .bashrc or whatever login profile you use. There are some other behaviors to more and less you might want to read the man pages for each and see what additional default options you want.

      Bottom line, if the termcap entry is sufficient for you, you can control that using the putty settings, but I don’t know exactly how for the .53b version