Disable MacOS SSH Password Login

January 16, 2023

Matt Hammond

Create 000-hostname.conf in /etc/ssh/sshd_config.d

000-hostname.conf

UsePAM no
PasswordAuthentication no

Restart SSH

sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd