Suppose a laptop goes missing and you want its key gone from every device it could open. Before asking how to do that, ask a stricter question: who is allowed to tell a device "trust this key" or "stop trusting that one", and what exactly does the device check before it believes them?

On a classic reverse-SSH setup the answer is vague. A shared key sits on every device, a public half sits on a jump host, and whoever can edit that file on the host effectively decides. We wanted the decision to live on the device and to be checkable by it. This post walks through the rules we settled on, and the places where they stop helping. The original, with the full write-up, is on our site.

Start by deleting the shared key

There is no shared fleet key. Each provisioning credential belongs to one team, and each device holds its own list of trusted public keys and the accounts those keys may open. The cap is 20 keys and 20 accounts per device.

A fresh install has to be handed that set, and it will not run without it. The installer prints every fingerprint and every account and asks you to confirm. Our servers cannot add a key or an account to a device. If you are migrating from an older setup, you can seed the list from an existing account's authorized keys at install time instead of starting clean.

After install, one door

Once a device is running, its list changes in exactly one way: a change signed by a key the device already trusts. The signature namespace is rescueshell-trust-v1. The signed payload names three things: the device, the next version number, and the challenge that device is holding for its current connection.

Each of those exists to shut a specific attack.

Replay. The version must be the device's stored version plus one. An old change, resent, is stale and refused.

Skip. The same rule works the other way. A change that jumps ahead of the stored version plus one is refused too, so nothing can be slipped in out of order.

Stockpile. The challenge changes on every connection. A signed change cannot be collected today and applied next week, because the challenge it names will be gone.

The device also requires that the signer is on its current list, and that the resulting list still has at least one key and at least one account. Writes are done so that a crash mid-update leaves each file either old or new, never half written.

Our server's job is to hold the signed change and pass it along. It has no signing role. If it misbehaves, the worst outcomes are a dropped change, a delayed one, or a replayed one, and the device refuses the replay as stale.

The lost laptop, as one command

From a key that is still trusted:

rescueshell trust <device> --sign-with ~/.ssh/other_key --add-key new.pub --remove-key lost.pub 

For a fleet, one signature can cover a group of online devices, up to 50 per batch, from the CLI or the browser, with one passkey tap or one passphrase. Both show each key fingerprint, each account and the signer before you confirm, and the relay counts the batch as one request. The tool will not sign a change that removes the key doing the signing, or that would leave a device with no key or no login account.

So rotation becomes: add the new key, check it works, remove the old one. Nothing is copied around and no shared file is edited.

Two removals, kept apart on purpose

When a person leaves, two separate things have to happen.

Removing them from the team is immediate. They can no longer open a shell through RescueShell on any device, online or offline, and their open shells end right away.

Removing their key from the devices is a signed change, as above. It still matters, because a key on a device's list is trusted by that device regardless of what happened to the team account that used it.

For audit, the server records key changes, host key accepts and refused sessions as fingerprints, never key bodies. Each agent keeps its own chained log of the shells it granted or refused. You can read that log, but there is no export and no session recording.

Where this falls short

  • We cannot know someone left. Taking a person off the team and taking their key off the devices are your jobs. Nothing feeds from your HR system.
  • A key on the device keeps working until you remove it. Team removal cuts access through us. It does not edit the device's list.
  • Offline devices keep the old list. A change names a challenge that exists only while the device is connected, so nothing is queued. Run it again when the device returns. The tool shows which devices are likely still on the old list, from what they last reported. That is a hint, not proof.
  • Signing needs a trusted key. Lose every key a device trusts and nobody can sign for it. The fix is to run the installer again on the device, as root.
  • A hostile browser frame could get a bad change signed with a key you unlock in it. Our threat model lists this as a residual risk, along with the protections we lean on.
  • Metadata is visible, and availability is ours to lose. We can see who connected where and when. When our servers are down, you get no shell through them, and we promise no uptime SLA and no high availability.
  • It is more steps than a shared key. With a handful of machines on a bench, a single key on a jump host is a fair choice and takes less effort. Per-device lists cost something each time you onboard a person, and they pay off as the fleet and the turnover grow.

One last caveat. The target is that someone holding full control of our backend and relay still opens zero shells. The red-team round that would test that end to end has not been run. Treat it as a goal, not a result.

RescueShell is a remote shell service for fleets of devices, hosted in the EU (exceptions listed). First device free to try, no card. The 30-day trial starts when it connects. Until a card is added, shell traffic is capped at 50 MB in total and a second device needs a card. After that: €0.10 per device per month, billed yearly, €6 yearly minimum, plus VAT.

Try it