Back Up Your SSH Key as 24 Words You Can Write on Paper

An SSH key lives on one disk and dies with it. MnemoSSH makes the key from 24 words, so a sheet of paper brings back the exact same key on any machine.

· 5 min read

If you run servers, or someone runs them for you, there is a small file that holds the keys to all of it. It’s called an SSH key. Every time a developer logs in to a server, pushes code or deploys a fix, that file proves who they are. No password, no code by SMS. Just the file.

That’s convenient right up to the day the laptop dies. The file lived on one disk, and now it’s gone. Every server that trusted it has to be told about a new key, one by one, and some of them are hard to reach without the key you just lost. A dead disk turns into a long evening.

We built MnemoSSH so that evening never happens. It makes the key from a list of 24 words. Write the words down, and the key is backed up. On a new machine, type the same words and you get the exact same key back.

The idea, borrowed from crypto wallets

Hardware crypto wallets solved this problem years ago. A wallet holds money, and a lost device can’t mean lost money. So the wallet gives you 12 or 24 plain English words when you set it up. Those words aren’t a password to the wallet. They are the wallet. Any compatible device can rebuild everything from them.

The word list follows a public standard called BIP39. It has 2048 short English words, a built-in check that catches most typos, and it has been tested by millions of people who really didn’t want to lose their savings.

MnemoSSH uses the same standard for a different job. The words go in, an SSH key comes out. Same words, same key, every time, on any computer.

What you actually do

Day one, you run one command. You get a normal SSH key pair (the same kind every server, GitHub and GitLab already accept) and 24 words. You write the words on paper, or two pieces of paper, and put them somewhere safe.

Then you forget about it. The key works like any other key.

The day the laptop dies, or gets stolen, or you simply move to a new one: install MnemoSSH, type the 24 words, and the old key is back. The servers never notice anything happened, because from their side nothing did. There’s also a check command that tells you if a key on disk really matches your words, so you can test the backup before you need it. Please do.

Why a sheet of paper beats a backup file

The usual advice is “back up your key file”. Fair enough. But a file needs somewhere to live: a USB stick, a cloud drive, a password manager. Each of those can fail, get locked, or get read by someone who shouldn’t read it. A cloud copy of your most important key is also a gift to whoever breaks into that cloud account later.

Paper has none of those problems. It needs no software, no account and no battery. It survives an operating system upgrade and a change of laptop brand. A fireproof box or a bank safe works fine.

A few honest notes, because this is security and honesty matters more than the pitch:

  • The words are the key. Anyone who reads them can rebuild it. Treat the paper like the key itself, because it is.
  • A passphrase still helps. You can lock the key file on your disk with a passphrase, so a stolen laptop doesn’t hand over the key. The passphrase only protects the file. It isn’t part of the 24 words, so changing it never changes the key.
  • One set of words, one key. If you want separate keys for work and home, make two sets of words.

Nothing to trust but a public recipe

A backup you can only restore with one specific program is a weak backup. Programs get abandoned. Ten years from now, who knows.

So the exact recipe that turns the words into a key is written out in the project’s documentation, step by step, using only standard building blocks. Any good developer can rebuild the key from the words without our tool, in any language, decades from now. The key that comes out is a plain, ordinary SSH key, not a special format that needs special software.

The tool itself is small and boring on purpose. It’s written in Rust, it has no network code at all, so it can’t send your words anywhere even by mistake, and it saves key files readable only by you. For the most careful setup, run it on a computer that’s offline. It doesn’t need the internet for anything.

The code is open source under the MIT license, on GitHub. Anyone can read it instead of trusting us, which is the only kind of trust a security tool should ask for.

Words you can remember

Twenty-four random words are easy to write down and hard to remember. If you’d like the backup to live in your head too, our free tool Seed Poet makes a valid word list that reads as a short rhyming poem. MnemoSSH accepts those words like any other list. We wrote about it in a recovery phrase you can actually remember.

Who it’s for

Developers and admins who log in to servers every day, small teams where one person holds the keys to production, and anyone who has already lived through the dead-laptop evening once and doesn’t want a second one. It runs on Linux, macOS and Windows.

Losing a laptop should cost you a laptop. Not your access to everything you run.

Share