Interview Prep/Linux/SSH & Access Hardening

Why use a drop-in file in /etc/ssh/sshd_config.d/ instead of editing sshd_config?

IntermediateProductionSSH & Access Hardening
Answer

Package upgrades may ship a new sshd_config and prompt or create .rpmnew/.dpkg-dist files; drop-ins are never touched. Configuration management also manages one small file cleanly. Note that sshd uses the first value it reads for most keywords, and the main file Includes the drop-ins near the top, so drop-ins win. On Ubuntu cloud images, 50-cloud-init.conf may set PasswordAuthentication yes, so name yours with a lower number.

All Linux questions Roadmap: Linux

More on SSH & Access Hardening