Linux Lockout Recovery

Regain access to a Linux server you are locked out of: "broke sudoers and cannot get root", "changed sshd config and now cannot log in", "lost the only SSH key", "firewall rule cut my own connection". Take the least destructive door in order: a session still open (keep it), serial or hypervisor console, the cloud provider's agent or run-command, then rescue boot or detaching the root volume onto a helper instance. Repair with the safe checkers (visudo -c, sshd -t, nft -c, iptables-restore --test, chroot), fix ownership and SELinux labels after offline edits, keep an untouched copy, and do not reset the root password first. Then add the guard: a second admin, a timed rollback, a test login before closing. Use for any self-inflicted lockout. Not for logins failing with a way in open (ssh-access-debugging), baselines (host-hardening) or no boot (boot-failure-recovery).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit 94f65bbda6

Frequently asked questions

npx get-skill add greenblacked/linux-lockout-recovery