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.
MaksymSerhii, how do I get into prod? Need to check the logs10:14
The key is in the keys folder on the drive, id_rsa. Drop it into ~/.ssh10:15Secret in plain text
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.
$ 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
Maksym left. What should Serhii do with the key?
Five rules for team SSH keys
- 1
Rule 1
One key — one person and one device
Don’t share a private key. Each member has their own key, and
authorized_keyson the server shows a comment with the name:maksym@laptop. - 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
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
Rule 4
An access list on every server
Review
authorized_keysregularly. Every line should belong to a specific person or system you know. - 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.
$ 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
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 5I thought offboarding was about the laptop and the badge. Turns out it’s also about six servers.
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
