Dealing with legacy issues around Red Hat crypto versions? Here's a fix

RHEL SHA-ll speak unto RHEL… except from 9 to 6

If you're running a mixture of new and old RHEL versions, you may have problems SSHing from new to old. Luckily, someone has worked out a handy way around it.

The issue is relatively simple: the default security settings in RHEL 9 mean that you can't open an SSH connection to a machine running RHEL 6 or older, which use the deprecated SHA-1 encryption algorithm. There are other, related issues as well: the inability to upgrade old RPM packages that are signed with SHA-1 signatures, or for Firefox to connect to an HTTPS server that uses a very old version of the protocol.

In some ways, this is fair enough. RHEL 6 reached its end of maintenance support in November 2020, and it's now in its "Extended Life phase". This is a known problem, and it has a relatively simple fix:

With some modern ssh implementations, legacy crypto policies required to interoperate with RHEL 5 sshd are disabled. To enable them, you may need to run this command on the conversion server (i.e. SSH client), but read update-crypto-policies(8) first:

# update-crypto-policies --set LEGACY

The problem is that this easy fix seriously downgrades the security of your shiny new RHEL 9 systems.

The result is that an issue with some very old OSes that are now past the end of their official maintenance period could affect brand new installations, if you're not careful about which instructions you follow.

In his bug report, Richard W M Jones says that "The alternative is to use service-specific voodoo." The good news is that he's now documented how to implement this specific voodoo.

There are also issues with the scp command, which now uses SFTP not SSH. We mentioned this when we covered the release of OpenSSH 9 earlier this year – but this came too late for inclusion in RHEL 9, which launched just a month later, and includes OpenSSH 8.7p1.

It's all down to the pesky old SHA-1 encryption algorithm. The Reg has been covering problems with SHA-1 for a long time, starting with the uncovering of weaknesses back in 2005, and problems with Chinese domain registrars still using it in 2016, for which sin Apple blocked its certificates. A SHA-1 collision was found in 2017, when SHA-1 was still used by some 20 per cent of websites.

SHA-1 has been on its way out for a while. By 2020 it was down to about 1 per cent of websites, and Apple dropped support for SHA-1 from macOS 10.15 and iOS 13. Microsoft stopped using SHA-1 signatures for Windows downloads and updates later that year. ®

Similar topics


Other stories you might like

Biting the hand that feeds IT © 1998–2022