Disable ssh password authentication on High Sierra
For High Sierra, to prevent authentication without publickey, in the /etc/ssh/sshd_config file, set

PasswordAuthentication no
UsePAM no


To restart sshd (which is required to have it reread the config file), use

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