homelab-automation/config/ssh/sshd_config
Benjamin Hays ded3046e77
Some checks failed
Ansible Deploy / deploy (ansible/playbooks/debian.yml) (push) Failing after 1m13s
Ansible Deploy / deploy (ansible/playbooks/proxmox.yml) (push) Failing after 1m1s
Ansible Lint / build (push) Failing after 1m6s
directory format overhaul
2025-05-18 09:56:22 -04:00

48 lines
1.2 KiB
Plaintext

# Based on https://infosec.mozilla.org/guidelines/openssh and further cipher hardening
Include /etc/ssh/sshd_config.d/*.conf
HostKey /etc/ssh/ssh_host_ed25519_key
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,curve25519-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,sntrup761x25519-sha512@openssh.com
Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
HostKeyAlgorithms ssh-ed25519,rsa-sha2-512,rsa-sha2-256
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com
LogLevel VERBOSE
AuthenticationMethods publickey
MaxAuthTries 3
MaxSessions 6
Compression no
TCPKeepAlive no
ClientAliveCountMax 2
PubkeyAuthentication yes
Banner /etc/login_banner
PermitRootLogin no
PasswordAuthentication no
PermitEmptyPasswords no
KbdInteractiveAuthentication no
KerberosAuthentication no
GSSAPIAuthentication no
UsePAM yes
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no
PrintMotd no
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
# override default of no subsystems
Subsystem sftp /usr/lib/openssh/sftp-server