Created
January 27, 2018 08:05
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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