Node security hardening: users, keys and SSH
A node is a service holding value-adjacent data and often keys, exposed to a network that scans everything. Hardening is not a product to buy; it is a discipline of least privilege: fewer users, fewer exposed doors, fewer standing permissions, and an audit habit that catches drift. The checklist below covers the surfaces where nodes actually get compromised — not the theoretical ones.
Users: the first surface
- One administrative user, named, not shared. Shared accounts destroy accountability: every action belongs to everyone and no one. Named users, individually auditable.
- Least privilege by default. The node runs as a dedicated user that owns only the chain data and config it needs. Root should not run the node, and daily work should not use root at all.
- Service accounts separated from human accounts. Monitoring, backups, and deployment each get their own account with only the permissions their job needs.
- Audit who exists, quarterly. Every user added for an incident and forgotten is a standing permission nobody remembers granting.
Keys: the irreplaceable surface
- Key-only authentication everywhere. Password SSH is a brute-force surface; disable it. Keys only, and only for users who need remote access.
- Keys with purpose and expiry. Deployment keys, admin keys, and monitoring keys are different keys with different scopes. Rotate on schedule and after any personnel change — an ex-employee's key is a vulnerability with a name.
- Keys stored like secrets. Private keys live encrypted, backed up, and access-logged. The node's security is only as good as the storage of the keys that control it.
- Validator and wallet keys get extra ceremony. These keys hold value directly: hardware isolation, air-gapped backups, and documented recovery. They never live in the same file as everything else.
SSH: the exposed door
- Tunnel or restrict. SSH reachable only through a private network, a VPN, or a tight source allowlist. The public internet should not see port 22 on a node.
- No direct root login. Root logs in as a named user and escalates deliberately. Every step is auditable.
- Brute-force tooling and alerting on auth events. Failed attempts are normal; successful logins from unexpected places are the signal worth paging on.
- Config under version control. SSH and user changes get committed, reviewed, and dated. Drift between servers becomes visible.
The audit checklist
- List every user and their privileges; remove what is not needed.
- List every key and its purpose; rotate and revoke on schedule.
- Scan the listening ports; close anything not on the intended set.
- Review auth logs for successful logins from unexpected sources.
- Test the recovery path: can a new admin be admitted without touching the running node?
The takeaway
Node hardening is least-privilege discipline across three surfaces: named users with minimal privileges, purpose-scoped and rotated keys, and SSH that the public internet never sees — plus an audit habit that catches drift before an incident does. The node that gets compromised is usually the one with a forgotten user, an unrotated key, or an open door. Close them on purpose, and keep the audit calendar.