Move your PuTTY sessions to a Mac or Linux

By Pavel Stegnii · Published · All articles

Short answer. PuTTY keeps saved sessions in the Windows Registry, under HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions. To move PuTTY sessions to a Mac or Linux, export that key with reg export, copy the .reg file and your keys across, and rewrite each session as a Host block in ~/.ssh/config. Convert .ppk keys to OpenSSH format with PuTTYgen first. There are no passwords to move: PuTTY never saved them.

Years of PuTTY use leave you with a long list of saved sessions and a folder of .ppk keys, and neither opens on a Mac. This article shows where that data lives, how to get it out, how to turn it into something the ssh command on macOS and Linux understands, and what MyXterm's importer does and doesn't bring across.

Where PuTTY keeps its sessions

  • Windows. In the Registry: saved sessions under HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions, and the host keys PuTTY has accepted under SshHostKeys next to it [1] [2].
  • Linux and other Unix systems. In the folder ~/.putty [2], with one file per session in ~/.putty/sessions.
  • macOS. Nowhere: the PuTTY team publishes no Mac version, and its FAQ doubts there will ever be one [2].
  • Passwords. Not stored at all. The FAQ's answer to Does PuTTY remember my password? is no [2].

Export PuTTY sessions from Windows

In a Command Prompt on the Windows machine:

reg export HKCU\Software\SimonTatham\PuTTY\Sessions putty-sessions.reg

Or open Registry Editor, go to that key, right-click it and choose Export. The result is a text file with one block per session. Names are escaped (a space becomes %20), and numbers are written in hexadecimal:

[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\core%20sw1]
"HostName"="192.0.2.10"
"PortNumber"=dword:00000016
"UserName"="netops"
"Protocol"="ssh"
"PublicKeyFile"="C:\\Users\\me\\keys\\core.ppk"

Here dword:00000016 is port 22. The file lists every host and user name you work with, so treat it like an inventory: copy it over a channel you trust and delete the copies you don't need.

Convert the sessions to ~/.ssh/config

The ssh command on macOS and Linux reads saved connections from ~/.ssh/config. A PuTTY session becomes a Host block, and the values map one to one [3]:

PuTTY value          ssh_config keyword
HostName             HostName
PortNumber           Port
UserName             User
PublicKeyFile        IdentityFile   (after converting the key)
PingIntervalSecs     ServerAliveInterval
Compression          Compression yes
X11Forward           ForwardX11 yes
AgentFwd             ForwardAgent yes
PortForwardings      LocalForward / RemoteForward / DynamicForward

The session above becomes:

Host core-sw1
    HostName 192.0.2.10
    User netops
    Port 22
    IdentityFile ~/.ssh/core

After that, ssh core-sw1 connects. Pick names without spaces. In PuTTY each saved session is independent of the Default Settings [1]; in ssh_config, settings you want everywhere go under a Host * block. With more than a few dozen sessions, split the file with Include; the guide on managing many SSH sessions shows a layout that scales.

Convert .ppk keys to OpenSSH format

OpenSSH doesn't read PuTTY's .ppk files. PuTTYgen converts them:

  • On Windows: load the key in PuTTYgen, type its passphrase, and choose Conversions, Export OpenSSH key [4]. For an RSA key used only with a recent OpenSSH, Export OpenSSH key (force new file format) writes the newer format.
  • On Linux or a Mac: the command-line puttygen does the same [5]. On Debian and Ubuntu it is in the putty-tools package.
puttygen core.ppk -O private-openssh -o ~/.ssh/core
chmod 600 ~/.ssh/core

The passphrase stays the same through the conversion [4]. Point IdentityFile at the new file, and delete stray copies of the private key once the first sign-in works.

What doesn't come along: host keys, serial and Telnet

Host keys. The keys PuTTY accepted stay in the Registry. On the new machine, ssh asks about each host the first time. Don't answer yes out of habit: compare the fingerprint it shows with the one the server or device itself reports.

Serial and Telnet sessions. ~/.ssh/config has no place for them. Write down the port, speed and line settings and create them again in whatever terminal you use; Cisco console from a Mac covers the serial side.

Importing PuTTY sessions into MyXterm

MyXterm is a free, open-source (Apache-2.0) connection manager and terminal for macOS, Linux and Windows. v0.1.0 is the first stable release. macOS builds are signed and notarized; Windows and Linux builds are not code-signed yet.

If you'd rather keep a list of sessions with folders than a config file, MyXterm reads the export directly partial SESS-006. Run Import from PuTTY… (command palette, or Import on the Hosts page) and pick the .reg file, or the ~/.putty/sessions folder on Linux [6].

  • Imported: SSH sessions with host, port, user, key file path, compression, X11 and agent forwarding, keepalive and remote command. A session named Folder/Name lands in that folder. Importing the same file again creates no duplicates.
  • Reported, not applied: proxy settings and port forwardings. A .ppk path is kept and flagged for conversion, and a Windows key path seen on another system is flagged so you can point it at the key's new place.
  • Skipped and counted: Telnet, serial, raw, Rlogin and SUPDUP sessions. You create those again by hand.
  • Never read: passwords (PuTTY has none) and host keys. MyXterm asks you to check each host key on the first connection.

What isn't there yet. The importer does not read the live Windows Registry, so on Windows you export the file first as well. Reading .ppk keys is not tested; convert them as above. The importer is tested on unit fixtures (registry exports in UTF-16 and ANSI, the Unix folder layout, broken input), not yet on a large real-world PuTTY export. If something doesn't come across, please open an issue without host names.

Download MyXterm PuTTY and MyXterm compared

FAQ

Where does PuTTY store saved sessions?

On Windows, in the Registry under HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions. On Linux and other Unix systems, in the folder ~/.putty/sessions, one file per session.

How do I export PuTTY sessions?

Run reg export HKCU\Software\SimonTatham\PuTTY\Sessions putty-sessions.reg in a Windows Command Prompt, or export that key from Registry Editor. The result is a text file with one block per session.

Can I use my PuTTY sessions on a Mac?

Not directly: the PuTTY team publishes no Mac version, and macOS has no Registry. Rewrite each session as a Host block in ~/.ssh/config for the built-in ssh command, or import the exported file into a client that reads it, such as MyXterm.

How do I convert a .ppk key to OpenSSH format?

In PuTTYgen on Windows, load the key and choose Conversions, Export OpenSSH key. On Linux or a Mac, run puttygen mykey.ppk -O private-openssh -o my-openssh-key.

Sources

All read on 4 December 2026. MyXterm statuses are from features.toml on the same day; partial means it works in the app but does not meet its full acceptance criteria yet.

  1. PuTTY manual, §4.1.2 (saved sessions in the Registry): the.earth.li/~sgtatham/putty/latest/htmldoc/Chapter4.html
  2. PuTTY FAQ, A.2.2 (passwords), A.3.2 (Mac version), A.5.2 (where data is stored): chiark.greenend.org.uk/~sgtatham/putty/faq.html
  3. OpenSSH, ssh_config manual page: man.openbsd.org/ssh_config
  4. PuTTY manual, §8.2.15 (private keys in other formats): the.earth.li/~sgtatham/putty/latest/htmldoc/Chapter8.html
  5. puttygen manual page, as packaged in Debian's putty-tools: manpages.debian.org/trixie/putty-tools/puttygen.1.en.html
  6. MyXterm PuTTY importer: crates/sessions/src/putty.rs and SESS-006 in features.toml

Last updated