In this page is an error for Ubuntu 24.04
https://help.ovhcloud.com/csm/en-ca-vps-security-tips?id=kb_article_view&sysparm_article=KB0047696
When you update the SSH port number to use, the final step is mentioned as:
sudo systemctl restart ssh.service
This is incorrect. You must use:
systemctl restart ssh-socket