community-content
community-content copied to clipboard
Securing the SSH service
Problem
When creating a Cloud Server using the WireGuard Image, it seems that the SSH service on the host is managed by ssh.socket
. When trying to secure the SSH service through /etc/ssh/sshd_config
, configuration changes are not applied because restarting the ssh service does not implement the new configuration (likely due to the trigger from ssh.socket
).
Suggested Fix
Disable the ssh.socket
service and manually restart the ssh.service
(On current releases of Ubuntu 24.04 LTS (GNU/Linux 6.8.0-38-generic x86_64)) via: sudo systemctl restart ssh
. If needed, ssh.socket
can be enabled later on.
Please correct me if I'm wrong.