ansible-role-security
ansible-role-security copied to clipboard
Fix sshd handlers for Debian 12.
Debian 12, Ubuntu 22 and above need to re-run systemd generators to pull the updated sshd port config.
Just changing sshd_config has no effect, sshd still listens on default port 22.
In this PR I add an additional handler for Debian that simply runs systemctl daemon-reload
. This forces systemd to rerun its generators.
https://discourse.ubuntu.com/t/sshd-now-uses-socket-based-activation-ubuntu-22-10-and-later/30189/14