Set-OPS-Public/roles/ssh_hardening/templates/20-setops-hardening.conf.j2

27 lines
854 B
Django/Jinja

# Managed by Ansible — Set-OPS
Port {{ ssh_hardening_port }}
PermitRootLogin {{ ssh_hardening_permit_root_login }}
PubkeyAuthentication {{ ssh_hardening_pubkey_authentication }}
PasswordAuthentication {{ ssh_hardening_password_authentication }}
AuthenticationMethods publickey
KbdInteractiveAuthentication no
ChallengeResponseAuthentication no
PermitEmptyPasswords no
HostbasedAuthentication no
IgnoreRhosts yes
X11Forwarding no
AllowTcpForwarding no
AllowAgentForwarding no
AllowStreamLocalForwarding no
PermitTunnel no
GatewayPorts no
PermitUserEnvironment no
PermitTTY yes
TCPKeepAlive no
ClientAliveInterval {{ ssh_hardening_client_alive_interval }}
ClientAliveCountMax {{ ssh_hardening_client_alive_count_max }}
MaxAuthTries {{ ssh_hardening_max_auth_tries }}
LoginGraceTime {{ ssh_hardening_login_grace_time }}
MaxSessions 2
MaxStartups 5:30:20