sudo apt install lynis
sudo lynis audit system
sudo less /var/log/lynis.log
sudo cat /var/log/lynis-report.dat | grep -E 'warning|suggestion'
Lynis inspects configuration (SSH, users, kernel settings, services, updates, file permissions) and prints warnings and suggestions plus a hardening index. It changes nothing. Treat it as a to-do list, not a score to maximise: apply the items that make sense for the machine's role and note why you skip the others. Re-run after changes. It is a good complement to ss, a firewall review and keeping packages updated.