53 lines
1.4 KiB
Django/Jinja
53 lines
1.4 KiB
Django/Jinja
# Alliance Boréale - SSH Daemon Configuration
|
|
# Generated by Ansible - DO NOT EDIT MANUALLY
|
|
# Host: {{ inventory_hostname }}
|
|
# Date: {{ ansible_date_time.iso8601 }}
|
|
|
|
# Network
|
|
Port {{ ssh.port | default(22) }}
|
|
AddressFamily inet
|
|
ListenAddress 0.0.0.0
|
|
|
|
# Authentication
|
|
PermitRootLogin {{ 'yes' if ssh.permit_root_login | default(false) else 'no' }}
|
|
PubkeyAuthentication {{ 'yes' if ssh.pubkey_authentication | default(true) else 'no' }}
|
|
PasswordAuthentication {{ 'yes' if ssh.password_authentication | default(false) else 'no' }}
|
|
PermitEmptyPasswords no
|
|
ChallengeResponseAuthentication no
|
|
|
|
# Security
|
|
Protocol 2
|
|
HostKey /etc/ssh/ssh_host_ed25519_key
|
|
HostKey /etc/ssh/ssh_host_rsa_key
|
|
|
|
# Ciphers and algorithms
|
|
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com
|
|
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com
|
|
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
|
|
|
|
# Login grace time
|
|
LoginGraceTime 60
|
|
MaxAuthTries 3
|
|
MaxSessions 10
|
|
|
|
# Forwarding
|
|
X11Forwarding no
|
|
AllowTcpForwarding yes
|
|
PermitTunnel no
|
|
|
|
# Keep alive
|
|
ClientAliveInterval 300
|
|
ClientAliveCountMax 2
|
|
|
|
# Logging
|
|
SyslogFacility AUTH
|
|
LogLevel VERBOSE
|
|
|
|
# Subsystems
|
|
Subsystem sftp /usr/lib/openssh/sftp-server
|
|
|
|
# Allow specific users
|
|
AllowUsers {{ users.ansible.name | default('ansible') }}
|
|
|
|
# Banner (optional)
|
|
# Banner /etc/ssh/banner
|