]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
OpenSSH: Order symmetric ciphers by strength
authorPeter Müller <peter.mueller@ipfire.org>
Sat, 21 Sep 2024 15:30:00 +0000 (15:30 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 22 Sep 2024 14:40:07 +0000 (14:40 +0000)
We also wish to prefer AES over Chacha/Poly, given the
prevalence of hardware accelaration for the former.

Signed-off-by: Peter Müller <peter.mueller@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/ssh/ssh_config
config/ssh/sshd_config

index 86f123e283b42c577184c3e1343b343371749e81..d5f63f315c624230ccec8d524616ec2e3d98b117 100644 (file)
@@ -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)
index 4214167054665ec670dc6843c4ef1f27251b5425..e338f8cef5dba9580e741503933e9985138c708e 100644 (file)
@@ -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)