Figure out sshd algorithms for noble
Opened this issue · 0 comments
Description
Our sshd_config ships with:
# Cipher selection
Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr
# Don't use SHA1 for kex
KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group-exchange-sha256
# Don't use SHA1 for hashing, don't use encrypt-and-MAC mode
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com
We should update this for noble.
I was reading through https://blog.stribik.technology/2015/01/04/secure-secure-shell.html because I was trying to understand the whole /etc/ssh/moduli
and it seems like we could drop diffie-hellman-group-exchange-sha256
for diffie-hellman-group14-sha256
/diffie-hellman-group16-sha512
/diffie-hellman-group18-sha512
and not have to deal with the moduli file. But I guess the group exchange one is preferred?
Also instead of setting a fixed list, we could just subtract the ones we don't want, so we get the advantage of newer algos without needing to manually update our lists each time. It also supports wildcards so theoretically do something like KexAlgorithms -*sha1
.
Per https://www.man7.org/linux/man-pages/man5/sshd_config.5.html the upstream default currently is:
Ciphers
chacha20-poly1305@openssh.com,
aes128-ctr,aes192-ctr,aes256-ctr,
aes128-gcm@openssh.com,aes256-gcm@openssh.com
KexAlgorithms
sntrup761x25519-sha512@openssh.com,
curve25519-sha256,curve25519-sha256@libssh.org,
ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,
diffie-hellman-group-exchange-sha256,
diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,
diffie-hellman-group14-sha256
MACs
umac-64-etm@openssh.com,umac-128-etm@openssh.com,
hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,
hmac-sha1-etm@openssh.com,
umac-64@openssh.com,umac-128@openssh.com,
hmac-sha2-256,hmac-sha2-512,hmac-sha1