Skip to content

Instantly share code, notes, and snippets.

@sfpprxy
Forked from eegrok/no-ssh-password-mac.txt
Created June 12, 2019 06:58
Show Gist options
  • Select an option

  • Save sfpprxy/510e225c8d0fd2cea1f333743c6627ed to your computer and use it in GitHub Desktop.

Select an option

Save sfpprxy/510e225c8d0fd2cea1f333743c6627ed to your computer and use it in GitHub Desktop.
disable password ssh authentication on mac os
make sure the following lines are set in /etc/sshd_config (or /etc/ssh/sshd_config on ubuntu)
(they all exist already, but are commented, some may have a value of yes)
PasswordAuthentication no
ChallengeResponseAuthentication no
UsePAM no
then restart the ssh server (uncheck / recheck 'Remote Login' in the 'System Preferences' -> 'Sharing' panel)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment