Merge pull request #8 from jdshewey/patch-1
Fix issue w/ Cent/RHEL 6/7 causing sshd to fail startup
diff --git a/openssh/files/sshd_config b/openssh/files/sshd_config
index 59da0a5..8ecc5a9 100755
--- a/openssh/files/sshd_config
+++ b/openssh/files/sshd_config
@@ -47,8 +47,13 @@
{%- if server.authorized_keys_command is defined %}
AuthorizedKeysCommand {{ server.authorized_keys_command.command }}
-AuthorizedKeysCommandUser {{ server.authorized_keys_command.get('user', 'nobody') }}
+{% if (grains['os_family'] == 'RedHat' and grains['osmajorrelease'] != '6') or grains['os_family'] != 'RedHat' %}
+{%- if server.authorized_keys_command.user is defined %}
+AuthorizedKeysCommandUser {{ server.authorized_keys_command.get('User', 'nobody') }}
{%- endif %}
+{%- endif %}
+{%- endif %}
+
{% if server.get('deny_users', False) %}
DenyUsers {{ server.deny_users|join(' ') }}