I have noticed that the ssh-keygen for ubuntu 20.04 is missing the options for generating the Diffie-Hellman parameters. This is normally part of SSH hardening. Does anyone know why it has disappeared?
I have noticed that the ssh-keygen for ubuntu 20.04 is missing the options for generating the Diffie-Hellman parameters. This is normally part of SSH hardening. Does anyone know why it has disappeared?
The reason invoked was to free up several option letters for the
ssh-keygen
command. This was consolidated in additional-O
options and an modified use of the-M
option, which breaks compatibility with former versions. This was done on 30 Dec 2019 in this commit:The newer syntax is described in the newer (focal)
ssh-keygen
man page under MODULI GENERATION:This isn't an ubuntu issue, it is actually a part of OpenSSH. the diffie-hellman algorithm is notably weak and so they have made it legacy in more recent versions in favor of stronger algorithms.
If you need to communicate with a system that requires diffie-hellman you can do:
ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 user@legacyhost
Or you can substitute any legacy algorithm in place of diffie-hellman