From 973b37be4e1a7fb0ab42d6582103880c8ec3c211 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Wed, 2 Sep 2015 16:55:51 +0300 Subject: [PATCH] roles/common: Tweak sshd_config to match NSA Suite B recommendations NSA stopped recommending AES-128 in August, 2015... Before: https://web.archive.org/web/20150403110658/https://www.nsa.gov/ia/programs/suiteb_cryptography/index.shtml After: https://web.archive.org/web/20150815072948/https://www.nsa.gov/ia/programs/suiteb_cryptography/index.shtml I don't see why we shouldn't follow suit; maybe they know something we don't! Signed-off-by: Alan Orth --- roles/common/templates/sshd_config_Debian-8.j2 | 8 +++++--- roles/common/templates/sshd_config_Ubuntu-14.04.j2 | 8 +++++--- roles/common/templates/sshd_config_Ubuntu-15.04.j2 | 8 +++++--- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/roles/common/templates/sshd_config_Debian-8.j2 b/roles/common/templates/sshd_config_Debian-8.j2 index 1280d8c..0a1e33a 100644 --- a/roles/common/templates/sshd_config_Debian-8.j2 +++ b/roles/common/templates/sshd_config_Debian-8.j2 @@ -85,9 +85,11 @@ Subsystem sftp /usr/lib/openssh/sftp-server # and ChallengeResponseAuthentication to 'no'. UsePAM yes -# https://stribika.github.io/2015/01/04/secure-secure-shell.html -Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr -MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com +# Originally from: https://stribika.github.io/2015/01/04/secure-secure-shell.html +# ... 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 KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 # only allow shell access by provisioning user diff --git a/roles/common/templates/sshd_config_Ubuntu-14.04.j2 b/roles/common/templates/sshd_config_Ubuntu-14.04.j2 index 305f73b..6b35fd1 100644 --- a/roles/common/templates/sshd_config_Ubuntu-14.04.j2 +++ b/roles/common/templates/sshd_config_Ubuntu-14.04.j2 @@ -85,9 +85,11 @@ Subsystem sftp /usr/lib/openssh/sftp-server # and ChallengeResponseAuthentication to 'no'. UsePAM yes -# https://stribika.github.io/2015/01/04/secure-secure-shell.html -Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr -MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com +# Originally from: https://stribika.github.io/2015/01/04/secure-secure-shell.html +# ... 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 KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 # only allow shell access by provisioning user diff --git a/roles/common/templates/sshd_config_Ubuntu-15.04.j2 b/roles/common/templates/sshd_config_Ubuntu-15.04.j2 index 1280d8c..0a1e33a 100644 --- a/roles/common/templates/sshd_config_Ubuntu-15.04.j2 +++ b/roles/common/templates/sshd_config_Ubuntu-15.04.j2 @@ -85,9 +85,11 @@ Subsystem sftp /usr/lib/openssh/sftp-server # and ChallengeResponseAuthentication to 'no'. UsePAM yes -# https://stribika.github.io/2015/01/04/secure-secure-shell.html -Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr -MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-ripemd160-etm@openssh.com,umac-128-etm@openssh.com +# Originally from: https://stribika.github.io/2015/01/04/secure-secure-shell.html +# ... 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 KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 # only allow shell access by provisioning user