Interview Prep/Linux/SSH & Access Hardening

How do you remove unnecessary attack surface on a server?

BeginnerProductionSSH & Access Hardening
Answer
ss -tulnp                                     # what is listening?
systemctl list-unit-files --state=enabled     # what starts at boot?
sudo systemctl disable --now cups avahi-daemon rpcbind
sudo apt purge telnet rsh-client              # or dnf remove

Start from a minimal image, install only what the role needs, and bind internal services (Redis, metrics, admin UIs) to 127.0.0.1 or a private interface.

All Linux questions Roadmap: Linux

More on SSH & Access Hardening