123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- {% if ansible_prolog -%}
- {% from 'templates/ansible/prolog.j2' import prolog with context %}
- {{ prolog() }}
- {% endif -%}
- {% for port in ssh_ports %}
- Port {{ port }}
- {% endfor %}
- Protocol 2
- HostKey /etc/ssh/ssh_host_rsa_key
- HostKey /etc/ssh/ssh_host_dsa_key
- {% if ansible_lsb.major_release|int >= 7 %}
- HostKey /etc/ssh/ssh_host_ecdsa_key
- {% endif %}
- {% if ansible_lsb.major_release|int >= 8 %}
- HostKey /etc/ssh/ssh_host_ed25519_key
- {% endif %}
- UsePrivilegeSeparation yes
- {% if not ssh_usedns %}
- UseDns no
- {% endif %}
- KeyRegenerationInterval 3600
- ServerKeyBits 1024
- SyslogFacility AUTH
- LogLevel INFO
- LoginGraceTime 120
- PermitRootLogin without-password
- StrictModes yes
- RSAAuthentication yes
- PubkeyAuthentication yes
- IgnoreRhosts yes
- RhostsRSAAuthentication no
- HostbasedAuthentication no
- PermitEmptyPasswords no
- ChallengeResponseAuthentication no
- X11Forwarding no
- X11DisplayOffset 10
- PrintMotd no
- PrintLastLog yes
- TCPKeepAlive yes
- AcceptEnv LANG LC_*
- Subsystem sftp /usr/lib/openssh/sftp-server
- UsePAM yes
- MaxAuthTries 3
- {% if ssh_allowed_users %}
- AllowUsers {{ ssh_allowed_users | join(' ') }}
- {% endif %}
- {% if not ssh_allowed_users and ssh_allowed_groups %}
- AllowGroups {{ ssh_allowed_groups | join(' ') }}
- {% endif %}
- {% if ssh_local_config is defined %}
- {{ ssh_local_config|join('\n') }}
- {% endif %}
|