Skip to content

Instantly share code, notes, and snippets.

@royriojas
Forked from eegrok/no-ssh-password-mac.txt
Created October 10, 2022 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save royriojas/23e3c804cf993e0731305ec044c7ef5b to your computer and use it in GitHub Desktop.
Save royriojas/23e3c804cf993e0731305ec044c7ef5b 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