To update the sshd on macosx to require both password and public-key authentication, do the following…

  1. Go to /etc/ssh
  2. Edit sshd_config and add the following line:
    AuthenticationMethods publickey,password
  3. If the PasswordAuthentication line exists, make sure it is commented out:
    #PasswordAuthentication yes
  4. Restart the server by running these two commands:


sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist 
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist