saikyo-server-security/etc/ssh/sshd_config.d/99-saikyo-hardening.conf

42 lines
1.1 KiB
Plaintext

# Saikyo OS Server SSH Hardening
# Соответствует требованиям безопасности Минцифры
# Отключить root login
PermitRootLogin prohibit-password
# Только ключи
PubkeyAuthentication yes
PasswordAuthentication no
# Отключить пустые пароли
PermitEmptyPasswords no
# Протокол 2 только
Protocol 2
# Алгоритмы шифрования (ГОСТ-совместимые + современные)
Ciphers 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,hmac-sha2-512,hmac-sha2-256
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512
# Таймауты
ClientAliveInterval 300
ClientAliveCountMax 2
LoginGraceTime 60
# Логирование
LogLevel VERBOSE
# Ограничения
MaxAuthTries 3
MaxSessions 10
MaxStartups 10:30:60
# Отключить forwarding по умолчанию
AllowTcpForwarding no
X11Forwarding no
AllowAgentForwarding no
# Banner
Banner /etc/issue.net