Created
September 13, 2017 09:14
-
-
Save Zorlin/3c5602246d114d6dfbfc890628558c90 to your computer and use it in GitHub Desktop.
SSH CentOS Tricks
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
# Disable password-auth for sudo-capable users | |
# Only affects SSH, not su | |
{%- if not (grains.os == 'CentOS' and grains.osmajorrelease == '5') %} | |
Match User foo | |
PasswordAuthentication yes | |
Match Group {{ sudogroup }} | |
PasswordAuthentication no | |
{%- endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment