adds diffie-hellman-group14-sha256 to KexAlgorithms as per ssh-audit recommendation

Clément Fiere 2023-02-26 18:07:09 +02:00
parent c67d1ada84
commit deb3537943

@ -1,5 +1,5 @@
Same instructions as [Ubuntu 22.04 LTS Server](https://www.ssh-audit.com/hardening_guides.html#ubuntu_22_04_lts), Same instructions as [Ubuntu 22.04 LTS Server](https://www.ssh-audit.com/hardening_guides.html#ubuntu_22_04_lts),
except, remove `sntrup761x25519-sha512@openssh.com` from `KexAlgorithms` in step 4, as it seems not to be supported on pve. except, remove `sntrup761x25519-sha512@openssh.com` from `KexAlgorithms` in step 4, as support for it was dropped in pve.
That is : That is :
@ -30,7 +30,7 @@ sed -i 's/^\#HostKey \/etc\/ssh\/ssh_host_\(rsa\|ed25519\)_key$/HostKey \/etc\/s
cat <<EOF > /etc/ssh/sshd_config.d/ssh-audit_hardening.conf cat <<EOF > /etc/ssh/sshd_config.d/ssh-audit_hardening.conf
# Restrict key exchange, cipher, and MAC algorithms, as per sshaudit.com # Restrict key exchange, cipher, and MAC algorithms, as per sshaudit.com
# hardening guide. # hardening guide.
KexAlgorithms curve25519-sha256,curve25519-sha256@libssh.org,gss-curve25519-sha256-,diffie-hellman-group16-sha512,gss-group16-sha512-,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha256 KexAlgorithms diffie-hellman-group14-sha256,curve25519-sha256,curve25519-sha256@libssh.org,gss-curve25519-sha256-,diffie-hellman-group16-sha512,gss-group16-sha512-,diffie-hellman-group18-sha512,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 chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com MACs hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,umac-128-etm@openssh.com
HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com HostKeyAlgorithms ssh-ed25519,ssh-ed25519-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256,rsa-sha2-256-cert-v01@openssh.com