You've already forked ansible-linux-infra
initial commit
This commit is contained in:
34
roles/ssh_hardening/templates/sshd_config.j2
Normal file
34
roles/ssh_hardening/templates/sshd_config.j2
Normal file
@@ -0,0 +1,34 @@
|
||||
# {{ ansible_managed }}
|
||||
Port {{ ssh_port }}
|
||||
Protocol 2
|
||||
|
||||
PermitRootLogin no
|
||||
PasswordAuthentication no
|
||||
PubkeyAuthentication yes
|
||||
ChallengeResponseAuthentication no
|
||||
KbdInteractiveAuthentication no
|
||||
UsePAM yes
|
||||
MaxAuthTries {{ ssh_max_auth_tries }}
|
||||
AllowGroups {{ ssh_allow_groups }}
|
||||
|
||||
ClientAliveInterval {{ ssh_client_alive_interval }}
|
||||
ClientAliveCountMax {{ ssh_client_alive_count_max }}
|
||||
LoginGraceTime 30
|
||||
MaxSessions 4
|
||||
MaxStartups 10:30:60
|
||||
|
||||
X11Forwarding no
|
||||
AllowTcpForwarding no
|
||||
AllowAgentForwarding no
|
||||
PermitTunnel no
|
||||
GatewayPorts no
|
||||
|
||||
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
|
||||
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com
|
||||
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512
|
||||
|
||||
Banner /etc/issue.net
|
||||
LogLevel VERBOSE
|
||||
SyslogFacility AUTHPRIV
|
||||
|
||||
Include /etc/ssh/sshd_config.d/*.conf
|
||||
Reference in New Issue
Block a user