This sounds like it should be an easy process, especially for those looking at How To Disable diffie-hellman-group1-sha1 for SSH 2, yet somehow it is not.
From my /etc/ssh/sshd_config
file, I have:
KexAlgorithms [email protected],diffie-hellman-group-exchange-sha256
ssh -T | grep kex
shows that it is taking effect:
gssapikexalgorithms gss-gex-sha1-,gss-group14-sha1-
kexalgorithms [email protected],diffie-hellman-group-exchange-sha256
Yet, ssh -v
is showing that it is still offering diffie-hellman-group14-sha1
among others that I didn't ask for (note this is still a smaller list than if I didn't have the kex line in):
debug2: KEX algorithms: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
I am allowed to add it as a third option, but I cannot prepend a -
to remove it in this mode (as anx points out below mixing in this way is now allowed, but it does show I did restart):
Unsupported KEX algorithm "-diffie-hellman-group14-sha1"
/etc/ssh/sshd_config line 133: Bad SSH2 KexAlgorithms '[email protected],diffie-hellman-group-exchange-sha256,-diffie-hellman-group14-sha1'.
What do you have to do to get only the algorithms I list be the only ones actually offered, and specifically disable diffie-hellman-group14-sha1
OpenSSH_7.9p1, OpenSSL 1.1.1b FIPS 26 Feb 2019
0 Answers