Skip to content

Instantly share code, notes, and snippets.

@lucascantor
Created January 27, 2018 08:05
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 lucascantor/aa83c7620744b2f3cecc338966c411a6 to your computer and use it in GitHub Desktop.
Save lucascantor/aa83c7620744b2f3cecc338966c411a6 to your computer and use it in GitHub Desktop.
Append rules to to sshd_config to prohibit password ssh auth for a specific user
echo -e "\n# Prohibit password authentication for administrator user\nMatch User <username>\n\tKbdInteractiveAuthentication no\n\tPasswordAuthentication no" >> /etc/ssh/sshd_config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment