Initial Linux server hardening checklist
- Install supported security updates and reboot if the kernel or core libraries require it.
- Create a named administrative user and verify sudo access.
- Install at least two controlled SSH public keys before restricting password or root login.
- Allow the active SSH port in the firewall before enabling a default-deny policy.
- Expose only required application ports and bind private services to loopback or a private address.
- Enable time synchronisation, review authentication logs, and configure monitoring.
- Create an off-server backup and test restoration.
Make one access-related change at a time and keep an authenticated session open until a second connection succeeds. Hardening copied blindly from another distribution can lock you out.