update
This commit is contained in:
47
roles/01-server_hardening/templates/sshd_config.j2
Normal file
47
roles/01-server_hardening/templates/sshd_config.j2
Normal file
@@ -0,0 +1,47 @@
|
||||
# SSH configuration for Minecraft server
|
||||
Port {{ ssh_port }}
|
||||
Protocol {{ ssh_protocol }}
|
||||
HostKey /etc/ssh/ssh_host_rsa_key
|
||||
HostKey /etc/ssh/ssh_host_ecdsa_key
|
||||
HostKey /etc/ssh/ssh_host_ed25519_key
|
||||
|
||||
# Logging
|
||||
SyslogFacility AUTH
|
||||
LogLevel INFO
|
||||
|
||||
# Authentication
|
||||
LoginGraceTime 60
|
||||
PermitRootLogin {{ ssh_permit_root_login }}
|
||||
StrictModes yes
|
||||
MaxAuthTries {{ ssh_max_auth_tries }}
|
||||
MaxSessions 10
|
||||
|
||||
PubkeyAuthentication {{ ssh_pub_key_authentication }}
|
||||
AuthorizedKeysFile .ssh/authorized_keys
|
||||
|
||||
PasswordAuthentication {{ ssh_password_authentication }}
|
||||
PermitEmptyPasswords no
|
||||
ChallengeResponseAuthentication no
|
||||
KerberosAuthentication no
|
||||
GSSAPIAuthentication no
|
||||
|
||||
UsePAM yes
|
||||
|
||||
AllowUsers {{ ssh_allow_users | join(' ') }}
|
||||
|
||||
X11Forwarding no
|
||||
PrintMotd no
|
||||
AcceptEnv LANG LC_*
|
||||
|
||||
# Connection settings
|
||||
ClientAliveInterval {{ ssh_client_alive_interval }}
|
||||
ClientAliveCountMax {{ ssh_client_alive_count_max }}
|
||||
TCPKeepAlive yes
|
||||
|
||||
# Restrict to specific users
|
||||
Match User {{ ssh_allow_users | join(',') }}
|
||||
AllowTcpForwarding no
|
||||
X11Forwarding no
|
||||
PermitTunnel no
|
||||
GatewayPorts no
|
||||
AllowAgentForwarding no
|
Reference in New Issue
Block a user