From: Peter Müller Date: Sat, 21 Sep 2024 15:30:00 +0000 (+0000) Subject: OpenSSH: Order symmetric ciphers by strength X-Git-Tag: v2.29-core190~108 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=68545eb2d1032e6b12b703b64fb7afe8329bdb5f;p=ipfire-2.x.git OpenSSH: Order symmetric ciphers by strength We also wish to prefer AES over Chacha/Poly, given the prevalence of hardware accelaration for the former. Signed-off-by: Peter Müller Signed-off-by: Michael Tremer --- diff --git a/config/ssh/ssh_config b/config/ssh/ssh_config index 86f123e283..d5f63f315c 100644 --- a/config/ssh/ssh_config +++ b/config/ssh/ssh_config @@ -10,7 +10,7 @@ Host * # Only use secure crypto algorithms KexAlgorithms sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,mlkem768x25519-sha256,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 - Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr + Ciphers aes256-gcm@openssh.com,aes256-ctr,chacha20-poly1305@openssh.com,aes192-ctr,aes128-gcm@openssh.com,aes128-ctr MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com # Always visualise server host keys (helps to identify key based MITM attacks) diff --git a/config/ssh/sshd_config b/config/ssh/sshd_config index 4214167054..e338f8cef5 100644 --- a/config/ssh/sshd_config +++ b/config/ssh/sshd_config @@ -21,7 +21,7 @@ MaxStartups 5 # Only allow safe crypto algorithms KexAlgorithms sntrup761x25519-sha512,sntrup761x25519-sha512@openssh.com,mlkem768x25519-sha256,curve25519-sha256,curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256 -Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr +Ciphers aes256-gcm@openssh.com,aes256-ctr,chacha20-poly1305@openssh.com,aes192-ctr,aes128-gcm@openssh.com,aes128-ctr MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com # Only allow cryptographically safe SSH host keys (adjust paths if needed)