Information
This variable limits the types of MAC algorithms that SSH can use during communication.
Notes:
- Some organizations may have stricter requirements for approved MACs.
- Ensure that MACs used are in compliance with site policy.
- The only "strong" MACs currently FIPS 140 approved are:
- HMAC-SHA1
- HMAC-SHA2-256
- HMAC-SHA2-384
- HMAC-SHA2-512
MD5-based, RIPEMD-160, 96-bit-truncated, and 64-bit (UMAC-64) MAC algorithms are considered weak and have been shown to increase exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of attention as a weak spot that can be exploited with expanded computing power. An attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the SSH tunnel and capture credentials and information.
Solution
The MAC algorithms available to the SSH server are governed by the system-wide crypto policy. Disable the weak MACs by configuring the system-wide crypto policy as described in the "Configure system wide crypto policy" section.
- IF - CVE-2023-48795 (Terrapin) has not been reviewed and addressed, the Encrypt-then-MAC (EtM) MACs should also be disabled through the system-wide crypto policy.
Once the crypto policy has been updated, reload the SSH daemon:
# systemctl reload-or-restart sshd
Impact:
A too restrictive list of MAC algorithms can lead to a "no matching MAC found" error during connection establishment, when a client and the server share no common algorithm. Verify that peers required to connect to this host support at least one of the retained MACs before applying.