Only the people you choose
More people may see the channel. Only taps from the Telegram numbers you set on the server count.
goTool › Respond to an intruder
Telegram
When someone really logs in over SSH and it's out of the ordinary (root, with a password, after many failures, a new account, a new IP or at odd hours), the alert reaches Telegram with buttons. You choose what to do and in which order. Nothing happens until you tap ▶ Do it.
🛡️ web1 · T-0012 new · severity high «deploy» has LOGGED IN over SSH from a new IP 203.0.113.7 🇳🇱 Amsterdam 👇 If it wasn't you and nobody should log in, choose what to do. Nothing happens until you tap ▶ Do it.
| Button | What it does on your server | Undo |
|---|---|---|
| 🚫 Block the IP | Into the firewall (nft or iptables): nothing comes in from it or goes out to it, so whatever they left calling home can't reach it either. Survives reboots. An IP from your internal network is never blocked. | ↩ Unblock |
| ✂️ Close their session | Cuts only the SSH connections from that IP. If other people use the account, they aren't cut off. | — |
| 🔒 Block the account | It can no longer log in over SSH, with a key or a password. For root: root over SSH is forbidden; your sudo stays as it was. | ↩ Unblock |
| 🧊 Freeze | The forensic report of the last 24 h with its chain of custody, saved on the server. It sends you its hash. | — |
| ⚡ Everything, in order | The recommended plan: 🚫 IP → 🧊 freeze → ✂️ session → 🔒 account. Close the door first, then the snapshot with them still inside, then cut them off. | — |
| ✅ It was me | Closes the ticket without touching anything. If they log in that way again, it alerts again. | — |
| 🤝 It's trusted | That key for that account, or that IP, stops alerting. For example, GitHub Actions when it deploys. | ↩ Alert again |
Each button is added with its number (1·, 2·…) in the order you tap it. Tapping it again removes it.
Runs it in that order. ✖ Clear the plan leaves everything as it was, without touching anything.
A message with each step as ✅ or ❌ and what happened. If it left something in place, it comes with ↩ Undo.
You can come back to the alert and do more later: the buttons stay ready.
More people may see the channel. Only taps from the Telegram numbers you set on the server count.
The service that talks to Telegram isn't root: it just leaves the request. Root, separately and offline, only acts if the person is on the list, the request is recent and the IP and account really logged in according to the system records.
It's the server that asks Telegram what was tapped, and only while there are alerts with buttons.
Who tapped, when, what was done and how it went. Frozen reports are kept on the server.
Some logins are yours and don't need watching: your office, or GitHub Actions deploying over SSH. Mark them with 🤝 on the alert or with a command. They are still recorded: they just don't alert.
Your home or office, up to a /16: a larger network would mean trusting half the internet.
GitHub logs in from a different IP every time, but its key doesn't change. It's tied to one account: that key only works for that account.
sudo gotool telegram allow 123456789 # your Telegram number
sudo gotool ssh trust SHA256:AbC…xyz --account=deploy --note="GitHub Actions"
sudo gotool ssh trust 90.160.205.0/24 --note="office"
gotool ssh trusted
Logging in after many failures always alerts, wherever it comes from: that's a guessed password.
No. It only acts when someone on your list taps ▶ Do it on an alert, and root first checks the records to make sure that IP and that account really logged in.
Every block comes with ↩ Undo on Telegram, and can also be undone from the command line. An IP from your internal network is never blocked.
Yes. They can share a bot and a channel: each server only handles the buttons on its own alerts.
Mark its key as trusted for the account it logs in with, using the 🤝 button or gotool ssh trust.