Skip to content

Instantly share code, notes, and snippets.

@Zorlin
Created September 13, 2017 09:14
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 Zorlin/3c5602246d114d6dfbfc890628558c90 to your computer and use it in GitHub Desktop.
Save Zorlin/3c5602246d114d6dfbfc890628558c90 to your computer and use it in GitHub Desktop.
SSH CentOS Tricks
# 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