Where to store your team’s SSH keys so offboarding doesn’t become an incident

Serhii’s studio had one SSH key for everyone. It sat in a shared Google Drive folder. Then Maksym left — and nobody knew how many laptops that key still lived on.

SerhiiMaksymCharacters: Serhii and Maksym
8 min read

Serhii is the sysadmin at a small web studio. Six servers, three databases, a dozen client projects. And one SSH key that was once “temporarily” put into a shared keys folder on Google Drive.

Studio · dev
6 members
  1. MaksymSerhii, how do I get into prod? Need to check the logs10:14
  2. The key is in the keys folder on the drive, id_rsa. Drop it into ~/.ssh10:15
    Secret in plain text
  3. MaksymGot it, I’m in 👍10:21

Over two years, everyone who worked at the studio copied that key. Contractors too. And a month ago Maksym moved to another company.

root@prod-1: ~/.ssh
$ cat ~/.ssh/authorized_keysssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7… studio-sharedssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDx… serhii@macbookssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK… deploy@ci$ for h in prod-{1..6}; do ssh $h grep -c studio-shared .ssh/authorized_keys; done6 servers, 1 key, unknown number of copies
Your choice

Maksym left. What should Serhii do with the key?

Five rules for team SSH keys

  1. 1

    Rule 1

    One key — one person and one device

    Don’t share a private key. Each member has their own key, and authorized_keys on the server shows a comment with the name: maksym@laptop.

  2. 2

    Rule 2

    A modern algorithm and a passphrase

    Create Ed25519 keys and always set a passphrase. Then a stolen key file is useless without the phrase.

  3. 3

    Rule 3

    Private keys — not in chats or on a drive

    No Google Drive, no Slack, no email. If a key must be stored centrally (for deployment, say), keep it only in a password manager with access control.

  4. 4

    Rule 4

    An access list on every server

    Review authorized_keys regularly. Every line should belong to a specific person or system you know.

  5. 5

    Rule 5

    Offboarding — by checklist

    When someone leaves, their key is removed from every server the same day. Shared passwords they saw are changed.

A new key for a colleague
$ ssh-keygen -t ed25519 -C "olena@studio-laptop"Enter passphrase (empty for no passphrase): ••••••••••••Your public key has been saved in ~/.ssh/id_ed25519.pub$ ssh-copy-id -i ~/.ssh/id_ed25519.pub olena@prod-1Number of key(s) added: 1
Free toolPassphrase generatorGenerate a passphrase for your SSH key from a few random words. Runs in your browser; nothing is sent to a server.Generate a phrase

What if the key really is shared?

Sometimes there truly is one key: for deployment, an old client server or hosting that doesn’t support multiple keys. Then the rule is simple — the key lives in one place, and you know who has seen it.

Passtuck has a dedicated “SSH” item type: host, port, login and private key. Folder access is granted to specific people, every view goes into the log, and when a member leaves, Passtuck shows the list of items they saw — so you change exactly those.

Serhii’s checklist for this week

0 of 5

I thought offboarding was about the laptop and the badge. Turns out it’s also about six servers.

SerhiiStudio sysadmin

Finish the story — get up to 15% offFinish the story

Make every decision and tick off the checklist.The better your decisions, the bigger the discount on your first plan: from 5% to 15%.You’ve already received a story discount, so here it’s just the summary and the checklist.

  • ○ Decisions 0 of 1
  • ○ Checklist 0 of 5
Server security25%Unsafe
Your choices move the meter

Characters of this story

  • Serhii

    Studio sysadmin

    Knows every server by heart. And one SSH key for the whole team, too.

  • Maksym

    Developer who recently left

    Moved to another company. The production key went with him.

Read next

All articles

Don’t be
the next hero

Keep your team’s passwords in one protected place. Free.

Create a workspace