From 9ea14de6f57f2e311794c15340a2a1fac5fb4f9c Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 22 Jul 2021 12:48:12 +0300 Subject: [PATCH] roles/common: Remove Encrypt-and-MAC modes from Ubuntu 20.04 sshd_config Recommended by ssh-audit, but also generally the concensus for a few years that Encrypt-and-MAC is hard to get right. OpenSSH has several Encrypt-then-MAC schemes available so we can use those. See: https://www.daemonology.net/blog/2009-06-24-encrypt-then-mac.html --- roles/common/templates/sshd_config_Ubuntu-20.04.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/common/templates/sshd_config_Ubuntu-20.04.j2 b/roles/common/templates/sshd_config_Ubuntu-20.04.j2 index 9e0e8d6..b45f37f 100644 --- a/roles/common/templates/sshd_config_Ubuntu-20.04.j2 +++ b/roles/common/templates/sshd_config_Ubuntu-20.04.j2 @@ -128,7 +128,7 @@ PasswordAuthentication yes # ... but with ciphers and MACs with < 256 bits removed, as NSA's Suite B now # does away with these! See: https://www.nsa.gov/ia/programs/suiteb_cryptography/index.shtml Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes256-ctr -MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512,hmac-sha2-256 +MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 {% if ssh_allowed_users is defined and ssh_allowed_users %}