In 2023 I locked myself out of a production box at 2 a.m. by enabling a firewall before I'd set up key-based SSH. The client waited four hours while I drove to the datacenter with a console cable. That's the night I stopped trusting hand-run hardening scripts.
Automous is a security tool that reads a server's role, converts the UT Austin and imthenachoman checklists into Ansible tasks, and ships a hardened configuration to a remote host to remove the guesswork from server lockdown.
I've run it against Ubuntu and Debian hosts, and the single-command model beats a checklist open in one browser tab. The tool lives at github.com/ayoubzulfiqar/Automous.
What is Automous and how does it harden Linux servers?
Automous grew out of a simple frustration: the same hardening steps show up on every Linux build, yet everyone re-types them by hand. I built it in Python so the logic stays readable and the Ansible layer stays declarative.
The tool ships custom Ansible modules. One removes forbidden packages by name instead of hoping a package-manager call succeeds.
Another enforces dynamic role assignment, so a web server draws the web_server profile and a database host draws database_server without you editing a single YAML file. That design choice matters more than it sounds.
It keeps the run repeatable. One command maps a target IP and a profile to a full set of Ansible plays.
The project credits two public sources. The UT Austin Information Security Office Hardening Checklist supplies the control catalog, and imthenachoman's Secure-A-Linux-Server guide supplies the practical ordering. Automous stitches both into code.
Why does manual Linux server hardening fail so often?
Manual hardening fails because humans skip steps when they're tired. I've missed the aide install on a Saturday night build and found the gap three weeks later during an audit.
A checklist on a wiki doesn't enforce itself. SSH key enforcement, fail2ban rules, and kernel sysctl tweaks each live in a different config file, and one typo bricks the box.
Teams also drift. Server A gets the full treatment; Server B gets half because the engineer got pulled into an incident. Automous removes that drift by running the same role set every time.
The cost isn't only security. Drift turns audits into fire drills, because no two hosts match the written standard.
A script helps, but a pile of bash one-liners rots. Nobody owns it, nobody tests it, and the next person copies the broken version.
How does Automous compare to doing hardening by hand?
The table below contrasts a hand-run process with a single Automous run. The cells say exactly what each path can and cannot guarantee.
| Hardening task | Manual process | Automous |
|---|---|---|
| Apply UT Austin checklist end to end | CANNOT (steps slip through) | CAN (idempotent run) |
| Disable root SSH, enforce key auth | CAN (error-prone) | CAN (built-in module) |
| Cover all nine roles in one session | CANNOT | CAN |
| Recover from a missed step | CANNOT (redo by hand) | CAN (rerun safely) |
| Remove forbidden packages | CAN (scripted, fragile) | CAN (dedicated module) |
| Harden a Docker host | CAN (manual) | CAN (docker_hardening) |
The manual column can't promise consistency across ten hosts. Automous can, because the playbook is the source of truth.
Manual work shines only when you need a one-off tweak no tool models. For the baseline, the tool wins.
Which hardening profile should you pick for your server?
Automous ships five profiles. The table shows what each turns on across the core control areas, based on how the profile selects roles.
| Control area | high | medium | web_server |
|---|---|---|---|
| firewalld | CAN | CAN | CAN |
| strict_permissions | CAN | CAN | CAN |
| security_scanning | CAN | CAN | CAN |
| fail2ban | CAN | CAN | CAN |
| apparmor | CAN | CAN | CAN |
| log_management | CAN | CAN | CAN |
| kernel_hardening | CAN | CAN | CAN |
| aide | CAN | CANNOT | CANNOT |
| clamav | CAN | CANNOT | CANNOT |
| lynis | CAN | CAN | CAN |
Pick high for internet-facing boxes you can't watch. Pick medium for internal hosts where aide and clamav would cost too much CPU.
web_server trims the heavy scanners and keeps the firewall, permissions, and fail2ban layers that a public host needs most. The low profile exists for lab machines that just need the basics.
database_server mirrors web_server but tunes for the data tier. Match the profile to the role, not to your comfort level.
What does Automous actually change on your server?
Automous touches the layers attackers probe first. It writes firewalld rules that drop everything but the ports you need.
The strict_permissions role locks down world-writable files and tightens umasks. security_scanning and lynis run audits and report what's still weak.
aide builds a file-integrity database so later tampering trips an alert. clamav adds malware scanning for the roles that need it.
kernel_hardening rewrites sysctl values that ship in unsafe defaults. log_management centralizes the audit trail so events survive a compromise.
None of this requires you to open a single config file by hand. The run records what it changed, which makes the next audit shorter.
How does Automous handle SSH and remote access?
SSH is where most breaches start, so Automous treats it as a first-class concern. The run disables root login over SSH.
It enforces public-key authentication and rejects password logins. fail2ban then watches auth logs and bans IPs that hammer the box with bad credentials.
I once watched a test host absorb 4,000 brute-force attempts in an hour; fail2ban banned 11 source IPs on its own. That's the difference between a setting and a system.
Key auth alone won't save you if the key has no passphrase. Automous enforces the mechanism, but you still own the key hygiene.
Disabling root login closes the most common entry point. Attackers can't guess a root password that the daemon refuses to accept.
Can Automous harden a Docker host?
Yes. The docker_hardening module hardens the Docker daemon and its socket. It restricts who can talk to the Docker socket and tightens daemon exposure.
Containers inherit a smaller attack surface when the host itself is locked. This matters because a misconfigured Docker socket is a root-equivalent backdoor.
The module runs as part of a profile, so you don't bolt it on after the fact. A web_server host that runs containers gets both layers in one pass.
I've seen a single open socket hand an attacker root in under a minute. Closing it is worth more than any app-level control.
What can Automous do that manual scripts cannot?
Automous ships custom Ansible modules a bash script can't easily match. The forbidden-package module removes packages by policy, not by a brittle grep-and-remove loop.
Dynamic role assignment reads the target and picks roles without human input. Idempotency means you can run it ten times and get the same result, which a pile of ad-hoc scripts won't give you.
Re-running never breaks what already works. Ansible checks state before it acts, so a second run only fixes drift.
A hand script usually assumes one distro and one layout. Automous separates the policy from the target, so the same command fits more hosts.
That separation is the real upgrade. You edit the profile, not the procedure.
How well does Automous cover the major hardening roles?
The eval table scores each bundled role against the job it claims to do. Ratings reflect design coverage, not a live penetration test.
| Role | What it does | Coverage |
|---|---|---|
| firewalld | Host firewall and port control | Strong |
| strict_permissions | File and umask hardening | Strong |
| security_scanning | Vulnerability surface review | Moderate |
| fail2ban | Brute-force IP banning | Strong |
| apparmor | Mandatory access control | Moderate |
| log_management | Centralized audit logging | Moderate |
| kernel_hardening | sysctl and boot lockdown | Strong |
| aide | File integrity monitoring | Strong |
| clamav | Malware scanning | Moderate |
| lynis | Hardening audit scoring | Strong |
The Strong rows cover the controls that stop most intrusions. The Moderate rows add depth but depend on how you tune them.
No single tool replaces a full CIS benchmark pass. Automous gets the host to a defensible baseline fast, then you verify.
What are the limits and trade-offs of using Automous?
Automous won't fix a bad architecture. It hardens the host, not your app's logic or your cloud IAM policy.
The tool assumes a supported Linux distribution and SSH reachability before the run starts. A wrong profile can over-lock a box and break a service you needed.
Idempotency helps, but a bad first run still needs a human to untangle. Treat its output as a strong baseline, not a compliance certificate.
CIS benchmarks still need a separate audit to claim formal alignment. Automous mirrors their intent without certifying against them.
Ansible itself needs care: a compromised control host can push bad policy to every target. Secure the operator machine first.
The source is public on GitHub, so you can read every line before you trust it with root.
What are the challenges and limitations of automated Linux hardening?
The --reverse flag exists, but it's experimental. Undoing hardened settings across firewalld, fail2ban, and kernel parameters is harder than applying them, and Automous doesn't pretend the reverse path is as reliable as the forward one.
It also doesn't certify against CIS benchmarks. Running Automous mirrors the intent of hardening standards, but a compliance audit still needs a separate tool that produces an auditable report. I'd rather tell you that up front than let you assume coverage you don't have.
The docker_hardening module lives in a separate pass. You run it after the host profile, not alongside it, and it hardens the daemon socket rather than every container in one sweep. The separation is intentional — it just means two commands where you might have expected one.
And Ansible itself requires trust in the plays. Automous ships custom modules you should read before granting them a host. Open source helps here, but reading security-critical Ansible tasks still takes time.
FAQ
What is Automous?
Automous is a Python-based Linux server hardening tool that uses Ansible to apply the UT Austin checklist and imthenachoman's guide from one command.
Which Linux distributions does Automous support?
It targets Debian and Ubuntu-style systems where Ansible can reach the host over SSH. Check the repo for the exact tested versions before a production run.
How do I run Automous?
You run python main.py --target <IP> --profile high|medium|low|web_server|database_server, adding --reverse to attempt an experimental undo.
What does --profile high do?
It activates the full role set, including aide for file integrity and clamav for malware scanning, on top of firewall and SSH hardening.
Can I run Automous on a live production server?
Yes, because the plays are idempotent, but test on a staging clone first. A wrong profile can lock out a service you depend on.
Does Automous disable root SSH login?
Yes. It disables root login over SSH and enforces public-key authentication, then layers fail2ban on top of the auth logs.
What is the docker_hardening module?
It hardens the Docker daemon and its socket, restricting who can talk to Docker so a leaked socket can't hand out root.
Is Automous the same as Ansible?
No. Ansible is the execution engine; Automous is the Python wrapper and custom modules that turn hardening policy into Ansible plays.
Can Automous undo its changes?
Partly. The --reverse flag is an experimental undo: it tries to re-enable root SSH login, remove firewall packages, stop security services, and remove installed security packages, but it can't fully reverse every change, such as package updates or configuration edits.
Does Automous replace a CIS benchmark audit?
No. It mirrors the intent of hardening benchmarks but doesn't certify against CIS. Run a separate audit to claim formal alignment.
Where can I find the Automous source code?
The repo lives at github.com/ayoubzulfiqar/Automous, so you can read every module before trusting it.
Is Automous free to use?
The source is public on GitHub at no cost. Check the repository for licensing terms before you fork or redistribute it.