I'm in the process of hardening the security of a root VPS that runs Ubuntu 24.04. The recent Ubuntu versions use socket-based activation, and from my understanding, they don't execute the sshd_config file, so changing this file is useless. I want to keep using the socket-based activation for SSH, as it seems faster and consumes fewer resources than sshd
I found out how to change the port to a custom port which is hard to guess, but I can't seem to find how to disable password authentication (my server was previously hacked through an easy password, and I don't wish this to repeat).
Note: By password authentication, I mean disable SSH access with password, allowing only public/private key based authentication.