PuTTY — How to Back Up and Restore Settings

PuTTY for Windows keeps saved sessions in the current Windows account’s registry. Export the PuTTY key to a .reg file, then import it while signed in to the destination account. If you use a .ppk private key for SSH (Secure Shell), preserve the file separately and check its path on the new PC.

What the backup includes

The default settings location is HKEY_CURRENT_USER\Software\SimonTatham\PuTTY. Sessions contains saved connection settings, and SshHostKeys contains cached server host keys. If you only need the saved sessions, export the Sessions subkey. Restrict access to the .reg file because it can contain host names, user names, and internal paths.

Where PuTTY stores its settings

Back up settings on the original PC

  1. Save your changes and close PuTTY. Press Windows+R and type regedit to open Registry Editor.
  2. Enter HKEY_CURRENT_USER\Software\SimonTatham\PuTTY in the address bar. Right-click PuTTY and choose Export, or use File > Export. Check that Selected branch points to the PuTTY key, then save a file with a recognizable name such as PuTTY-backup.reg.

Back up and restore the Windows registry

To use the terminal, run the command below in PowerShell from a folder you can write to. On success, PuTTY-backup.reg appears in that folder. If the key is missing, check that you are in the right Windows account and that you have saved a PuTTY session.

reg.exe export "HKCU\Software\SimonTatham\PuTTY" ".\PuTTY-backup.reg"

Microsoft’s reg export reference

Restore settings on the destination PC

  1. Sign in to the Windows account that will run PuTTY. If it already has settings, export them under a separate file name before importing anything. Import merges the contents into the registry. Matching settings can change, and sessions absent from the .reg file can remain.
  2. In Registry Editor, choose File > Import and select the .reg file you created. You can also double-click that trusted file and confirm that you want to add its contents. In PowerShell, run the command below from the folder containing the backup or specify its full path.
reg.exe import ".\PuTTY-backup.reg"

Microsoft’s reg import reference

Check the restored sessions and private key

Reopen PuTTY and find the imported names under Session > Saved Sessions. Select one, click Load, and check the host and port. If the sessions are missing, confirm that you imported under the same account that runs PuTTY and that the export includes Sessions.

For a session that uses a private key, securely transfer the .ppk and select it under Connection > SSH > Auth > Credentials. Return to Session and save. If the first connection shows a host-key confirmation or change warning, verify the fingerprint with your server administrator or another trusted source before proceeding.

PuTTY’s private key setting