## Bu dosya ansible tarafindan yonetilmektedir!
## Burada yapilan degisikliklerin uzerine yazilir!!
{{ ansible_managed }}

Port {{ ssh['Port'] }} 
ListenAddress {{ ssh['ListenAddressv4'] }}
ListenAddress {{ ssh['ListenAddressv6'] }}
Protocol {{ ssh['Protocol'] }}

TrustedUserCAKeys {{ ssh['TrustedUserCAKeys']['destination'] }}
RevokedKeys {{ ssh['RevokedKeys']['destination'] }}

UsePrivilegeSeparation {{ ssh['UsePrivilegeSeparation'] }}

KeyRegenerationInterval {{ ssh['KeyRegenerationInterval'] }}
ServerKeyBits {{ ssh['ServerKeyBits'] }} 

SyslogFacility {{ ssh['SyslogFacility'] }}
LogLevel {{ ssh['LogLevel'] }}

LoginGraceTime {{ ssh['LoginGraceTime'] }}
PermitRootLogin {{ ssh['PermitRootLogin'] }}
StrictModes {{ ssh['StrictModes'] }}

RSAAuthentication {{ ssh['RSAAuthentication'] }}
PubkeyAuthentication {{ ssh['PubkeyAuthentication'] }}

IgnoreRhosts {{ ssh['IgnoreRhosts'] }}
RhostsRSAAuthentication {{ ssh['RhostsRSAAuthentication'] }}
HostbasedAuthentication {{ ssh['HostbasedAuthentication'] }}
IgnoreUserKnownHosts {{ ssh['IgnoreUserKnownHosts'] }}

PermitEmptyPasswords {{ ssh['PermitEmptyPasswords'] }}

MaxAuthTries {{ ssh['MaxAuthTries'] }}
PermitUserEnvironment {{ ssh['PermitUserEnvironment'] }}
Ciphers {{ ssh['Ciphers'] }}
ClientAliveInterval {{ ssh['ClientAliveInterval'] }}
ClientAliveCountMax {{ ssh['ClientAliveCountMax'] }}

{% if ssh['AllowUsers'] != "" %}
AllowUsers {{ ssh['AllowUsers'] }}
{% endif %}
{% if ssh['AllowGroups'] != "" %}
AllowGroups {{ ssh['AllowGroups'] }}
{% endif %}
{% if ssh['DenyUsers'] != "" %}
DenyUsers {{ ssh['DenyUsers'] }}
{% endif %}
{% if ssh['DenyGroups'] != "" %}
DenyGroups {{ ssh['DenyGroups'] }}
{% endif %}

ChallengeResponseAuthentication {{ ssh['ChallengeResponseAuthentication'] }}

PasswordAuthentication {{ ssh['PasswordAuthentication'] }}

KerberosAuthentication {{ ssh['KerberosAuthentication'] }}
KerberosOrLocalPasswd {{ ssh['KerberosOrLocalPasswd'] }}
KerberosTicketCleanup {{ ssh['KerberosTicketCleanup'] }}

GSSAPIAuthentication {{ ssh['GSSAPIAuthentication'] }}
GSSAPICleanupCredentials {{ ssh['GSSAPICleanupCredentials'] }}

{% if ansible_fqdn in groups['firewallbuilder'] %}
X11Forwarding yes 
{% else %}
X11Forwarding {{ ssh['X11Forwarding'] }}
{% endif %}
X11DisplayOffset {{ ssh['X11DisplayOffset'] }}
PrintMotd {{ ssh['PrintMotd'] }}
PrintLastLog {{ ssh['PrintLastLog'] }}
TCPKeepAlive {{ ssh['TCPKeepAlive'] }}

UseLogin {{ ssh['UseLogin'] }}
UsePAM {{ ssh['UsePAM'] }}

{% if ansible_fqdn in groups['testfirewall'] %}
#Banner {{ ssh['RemoteBanner']['destination'] }}
{% else %}
Banner {{ ssh['RemoteBanner']['destination'] }}
{% endif %}

AcceptEnv LANG LC_*

Subsystem sftp /usr/lib/openssh/sftp-server
