Skip to content

Add host security hardening guides - #940

Open
jacobmattern wants to merge 2 commits into
mainfrom
docs/host-security-hardening
Open

Add host security hardening guides#940
jacobmattern wants to merge 2 commits into
mainfrom
docs/host-security-hardening

Conversation

@jacobmattern

Copy link
Copy Markdown
Contributor

Replaces the single-topic SSH password page with a set of guides covering the configuration a host is expected to get right on every machine.

Closes docs-78w.9.

Structure

Host > Maintenance > Security Hardening is a group whose title is itself the overview page (root), with eight guides beneath it:

Page Covers
Overview Fresh-install expectation, host responsibility, and fallback access
SSH Access Key-only login, a unique key pair per machine, fleet migration, pruning keys
Accounts and Sudo Who can log in, who can become root, removing leftovers
The Host Firewall ufw setup, what it covers, verifying from outside
Management Interfaces BMC/IPMI/iDRAC/iLO credentials and keeping them off the public internet
Keeping the System Current Automatic updates off, kernel checks as regular maintenance
Checking for Drift Re-running every check on a schedule
Recovery Undoing a change that locked you out
Per-Machine Checklist One pass per machine

The folded page

host/disable-ssh-password-login.mdx is folded into host/security/ssh-access in full, with a redirect to it and its two inbound links from verification-stages.mdx repointed. Nothing it told hosts was dropped — the manual-edit alternative and the "if it already says no, you are done" early exit are both preserved.

Approach

Every recommendation is paired with a command that shows current state. Every sample output was checked against Ubuntu Server 22.04 and 24.04 rather than written from memory, and sshd, ufw, Docker, unattended-upgrades, and vendor BMC guidance were verified against upstream documentation.

Two behaviours get explicit callouts because they are easy to get wrong and fail quietly:

  • Docker publishes instance ports below ufw. ufw governs host services only, and ufw status is not evidence of what the internet can reach — only a scan from outside is. This also means a missing ufw rule is not the cause when clients cannot connect, so the diagnosis table points at the router and upstream firewall instead.
  • sshd -T does not evaluate Match blocks. A machine can report clean and still accept passwords, so the guide checks for Match blocks directly.

Automatic updates stay off, consistent with hosting-overview.mdx, with kernel updates checked periodically and applied in a maintenance window via upgrade-kernel.

Safety

The pages that can leave a host unreachable — SSH Access and The Host Firewall — each open with a fallback-access prerequisite, including a branch for machines with no BMC. Steps that change state are ordered so the irreversible one comes after the check that proves it is safe, and every file the guides create or edit has a documented way back in Recovery.

Review

Reviewed by four passes covering command correctness, operational risk, completeness, and formatting. All internal links and anchors verified against a local Mintlify build; the /host/disable-ssh-password-login redirect resolves to the new SSH page.

Replaces the single-topic SSH password page with a set of guides covering
the configuration a host is expected to get right on every machine: SSH
keys, accounts and sudo, the host firewall, management interfaces, system
updates, drift checks, recovery, and a per-machine checklist.

host/disable-ssh-password-login.mdx is folded into host/security/ssh-access
in full, with a redirect and its two inbound links repointed. Nothing it
told hosts was dropped, and the manual-edit path and early exit it offered
are preserved.

Every recommendation is paired with a command that shows current state, and
every sample output was checked against Ubuntu Server 22.04 and 24.04
rather than written from memory. sshd, ufw, Docker, unattended-upgrades,
and vendor BMC guidance were verified against upstream documentation.

Two behaviours are called out because they are easy to get wrong and fail
quietly: Docker publishes instance ports below ufw, so ufw governs host
services only and its status is not evidence of what the internet can
reach; and sshd -T does not evaluate Match blocks, so it can report clean
on a machine that still accepts passwords.

Automatic updates stay off, consistent with hosting-overview, with kernel
updates checked periodically and applied in a maintenance window via
upgrade-kernel.
@mintlify

mintlify Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
vastai-80aa3a82 🟢 Ready View Preview Sep 4, 2026, 1:25 AM

💡 Tip: Enable Automations to automatically generate PRs for you.

Remove the per-machine checklist and drift-check pages. Defining a
maintenance cadence for hosts is out of scope; defining the machine
requirements Vast expects of them is not.

Rename "Keeping the System Current" to "Disable Automatic Updates" and
drop its maintenance-routine section, leaving the requirement and a
pointer to Upgrade the Kernel.

Fix commands that fail a direct copy-paste:

- Read APT::Periodic with apt-config dump rather than cat-ing
  20auto-upgrades, which misses 10periodic from update-notifier-common
  and can report a machine as clean while it still refreshes on a timer
- Replace cp -n, which warns on coreutils 9.x and has no 22.04-safe
  alternative flag, with a portable [ ! -e ] guard
- Promote the sshd port check ahead of the ufw limit rule
- Run apt-get update before installing ipmitool, and note that every
  ipmitool command needs the machine to have a BMC

Revise the prose across all seven pages to match the style of
verification-stages and how-to-self-test. No command or sample output
changed in this pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant