From 0e80539f5634013c4ebc3e86b260bb1bcc2d4c1e Mon Sep 17 00:00:00 2001 From: "Daniel A. Maierhofer" Date: Thu, 8 Mar 2018 23:17:33 +0100 Subject: [PATCH] Add SSH Security settings --- templates/sshd_config.j2 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/templates/sshd_config.j2 b/templates/sshd_config.j2 index abcebf4..291a0f4 100644 --- a/templates/sshd_config.j2 +++ b/templates/sshd_config.j2 @@ -15,6 +15,13 @@ ChallengeResponseAuthentication no PasswordAuthentication {{ common_openssh_password_authentication }} X11Forwarding {{ common_openssh_x11_forwarding }} PrintMotd no +{% if ansible_os_family == "Debian" %} +DebianBanner no +{% endif %} AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server UsePAM yes +KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512 +Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr +MACs umac-128-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com +HostKeyAlgorithms ssh-ed25519-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,ssh-rsa