# How I Built a Lockout-Proof Windows SSH Security Copilot for Ubuntu (With 90s Auto-Rollback)

> Source: <https://dev.to/chan_xier_3cadc869f19f45/how-i-built-a-lockout-proof-windows-ssh-security-copilot-for-ubuntu-with-90s-auto-rollback-i4l>
> Published: 2026-12-06 16:02:41+00:00

**Recommendation:** Never let an LLM emit raw shell commands on production hosts: constrain it to allowlisted actions and arm a timed auto-revert with an independent access probe before applying firewall or SSH changes.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

Most AI terminal tools let an LLM generate and run raw `bash` commands directly on your server. For anyone managing a production Ubuntu VPS, one bad firewall rule or hallucinated command can mean locking yourself out at 2 AM.

As a final-year computer security student in Malaysia, I built **[NodeHeal AI](https://nodeheal.hexforgedstudio.com)** to solve that without needing cloud root keys or complex SIEM agents.

Instead of giving an AI shell access, NodeHeal AI separates **detection**, **explanation**, and **execution**:

**Pinned SSH From Windows (Zero Cloud Root Keys):**

The desktop app sits in your Windows system tray and connects directly to your Ubuntu 24.04 / 26.04 LTS server using TOFU-pinned SSH. Credentials and API keys stay encrypted locally with Windows DPAPI.

**Deterministic Threat Detection (11 Live Rules):**

No AI guessing for detection — host telemetry flags SSH brute-force bursts, web scanners, `/tmp` malware execution, outbound reverse shells, and `nftables` firewall baseline drift (while leaving Docker/CrowdSec chains untouched).

**Local Secret Redaction Before BYOK AI:**

Before any incident context is sent to your own AI key (**Claude, Gemini, OpenAI, or 100% offline Local Ollama**), a local redactor strips private keys, JWTs, bearer tokens, and `.env` secrets.

**Allowlisted Catalog Fixes Only (Zero Raw AI Bash):**

The AI can explain what happened in plain English and recommend an ID from **14 pre-audited catalog actions** (like a scoped 10m/1h/24h `nftables` block, PID `SIGSTOP` freeze, or SSH hardening) — never arbitrary shell strings.

**90-Second Dead-Man's-Switch Auto-Rollback:**

Before applying any firewall or SSH change, Ubuntu arms a local 90-second `systemd-run` revert timer. NodeHeal applies the rule and opens a **fresh independent SSH probe** to prove you still have access. If that probe fails, the server rolls itself back automatically at 90 seconds.

`support@hexforgedstudio.com`)
I'd love honest feedback from Linux and VPS admins here — what edge cases or Ubuntu checks would you want next?
