I want to disable password auth – ie keys only – on SSH. I've done this many times on Linux variants, and some searching here suggests it's the same on Mac, ie:
/etc/ssh/sshd_config
Then add/edit:
PasswordAuthentication no
However, this seems to have no effect – ie I can still log in with a password. Is there any different trick to do this on High Sierra?
Best Answer
For High Sierra, to prevent authentication without publickey, in the /etc/ssh/sshd_config file, set
To restart sshd (which is required to have it reread the config file), use