*Persistently* disable password authentication in SSHD on macOS

Solution 1:

I think starting with macOS Monterey (12.x) you can add your changes for sshd_config to a file in /etc/ssh/sshd_config.d/*.conf.

I could not find documentation for this on macOS, but for example, on Ubuntu 20.04 the sshd_config manpage explains how this works.