Comment 1 for bug 2069041

Revision history for this message
Nick Rosbrook (enr0n) wrote : Re: Changing Port in sshd_config and restarting ssh.service without effect

With 24.04 LTS, ssh is socket activated by default. The configuration for the socket is generated by reading the regular /etc/ssh/sshd_config (or /etc/ssh/sshd_config.d/ snippets), but the configuration needs to be reloaded. So, the steps for configuring a new port are:

# Add new port to /etc/ssh/sshd_config.d/port.conf
systemctl daemon-reload
systemctl restart ssh.socket

The key point being that a systemctl daemon-reload is needed.