← /blog

What a hardening report actually looks like (real example)

2026-10-14 · Linux hardening · 6 min read

The advice itself is free. Disable root login. Use keys. Set up a firewall. You can find that list in a hundred places, and none of it needs to be bought.

What you actually pay for is evidence: proof that a specific setting on a specific machine was checked, changed, and verified.

Where this example comes from: it is my own lab, a Fedora container I hardened for this write-up — not a client engagement. The values and raw output are real; the machine is mine. I say this at the start because a sample report is only useful if you know what you are looking at.

The shape of it

1. SUMMARY          what was at risk, what's closed now
2. METHOD           what was checked, with which command
3. BEFORE / AFTER   table: setting · old value · new value · why
4. EVIDENCE         raw output, not claims
5. WHAT STAYED OPEN what wasn't fixed, and why
6. RECOMMENDATIONS  next steps, optional

Section 5 is the part that is easy to skip. It is also the part that makes the rest checkable — it is where the report states what it did not cover and where its conclusions stop.

The example: a small container in my lab

One purpose, reachable from the internet, SSH on the default port when this snapshot was taken. Here is the summary section, verbatim:

BEFORE: SSH accepted passwords (brute-forceable), root login
        permitted with a key only (PermitRootLogin without-password),
        X11 forwarding on, no firewall rules persisted, backup existed
        but had never been restored.

AFTER:  SSH keys only, root login disabled, X11 forwarding off,
        nftables default-deny with 2 ports open, backup restored
        and timed in an isolated environment.

CLOSED: 4 risks (2 high, 1 medium, 1 low)
OPEN:   2 (see section 5)

Before / after, with reasons

The table is the core of the report, because "why" is what separates a change from a guess.

SETTING                    BEFORE              AFTER        WHY
PasswordAuthentication     yes                 no           password auth is
                                                             brute-forceable at
                                                             internet scale
PermitRootLogin            without-password    no           removes a
                                                             well-known target
X11Forwarding              yes                 no           X11 forwarding
                                                             exposes a data
                                                             channel + display
MaxAuthTries               6                   3            limits attempts
                                                             per connection
nftables                   not persisted       default-deny only 22+443
                                                             open

Evidence (raw output, not claims)

Every line in the table above has an output behind it. This is what gets attached:

$ sshd -T | grep -iE "passwordauth|permitroot|x11forwarding"
passwordauthentication no
permitrootlogin no
x11forwarding no

$ nft list ruleset | head -6
table inet filter {
    chain input {
        type filter hook input priority 0; policy drop;

Note the first command. sshd -T does not contact a running daemon: it parses the configuration — including every Include — the way the daemon does at startup, and prints the values that would apply. That is what makes it better than reading the file by hand: it resolves the include chain. It is not proof that the running daemon has reloaded; for that, reload and test a real connection.

Four different things people call “verified”

“Verified” is doing a lot of work in most reports. Here is what the word can mean, weakest to strongest — and this example reaches the first two:

1. CONFIG PARSED ....... sshd -T / nft list ruleset
                          what would apply at the next reload
2. NEW CONNECTION ...... accept a fresh session, try a password
                          (or a key) and watch what the server does
3. EXTERNAL REACH ...... from another host: open, filtered or closed?
4. REBOOT PERSISTENCE .. everything above, again, after a restart

Step 1 is what the evidence block shows. Step 2 is the reload-and-test sentence above. Step 3 needs a second machine and is not in this snapshot. Step 4 was not done for this example — no reboot — so the report does not claim it. That is the whole discipline: name the rung you are standing on, and say which ones you skipped.

The trap that ate an hour

This one is worth publishing because it's the kind of thing that makes a "hardened" server not actually hardened.

I edited /etc/ssh/sshd_config correctly. The setting was there, uncommented, saved. And sshd -T still reported the old value.

The reason: modern distros include a drop-in directory near the top of the main config —

Include /etc/ssh/sshd_config.d/*.conf

— and in OpenSSH, the first value obtained wins. Drop-ins are read before the rest of the file, so a distro-shipped drop-in was overriding my edit. The fix isn't to edit harder; it's to put your setting where it's read first:

/etc/ssh/sshd_config.d/10-hardening.conf
    X11Forwarding no

Lower number, read earlier, wins. Lesson: what's written is not what's applied. Verify the effective configuration rather than the line you edited — and after a reload, test a real connection instead of trusting the output alone.

Section 5: what stayed open

Here's the part that builds more trust than any success claim:

1. No intrusion detection (auditd/AIDE) — out of scope for this
   engagement; monitoring is a separate service.
2. Backup restore was tested manually, not automated — schedule a
   quarterly restore test.

A report can end with zero open items for the scope it covered. That is a valid result — it means nothing actionable was found in what was checked. It is not proof that the server is secure, and it is not a reason to distrust the report either.

What makes a report checkable is not the number of open items. It is whether it states:

  • what was checked;
  • the evidence and the results;
  • what was not checked;
  • any risk that remains;
  • the limits of its own conclusions.

A zero-finding report that documents those five things is useful. One that omits them is not, whatever it concluded.

How to judge anyone selling you this

If you're shopping for hardening (from me or anyone else), ask for three things:

1. BEFORE / AFTER with the reason per setting — not a generic checklist
2. RAW OUTPUT as evidence — not screenshots of a tool's green ticks
3. WHAT STAYED OPEN — what was not checked, and any risk that remains

If a vendor can't produce those three, you're buying advice you could have found for free.

The honest part

Hostnames and IPs in the example are changed, and the values come from a lab box I run for exactly this purpose. The structure, the commands and the trap are real: the drop-in override above cost me an hour and is now written into the runbook so it does not cost the next one.

That is the whole point of doing the work in a lab before touching a production box. The mistakes are free there.

Sources: sshd_config(5) (first value wins; drop-ins via Include), sshd(8) for -T; nftables wiki for list ruleset.

Need this done on your box? Get in touch — async, no calls required. I'll tell you upfront what's in scope and what isn't.