ALMA-09-003325 - AlmaLinux OS 9 SSH server must be configured to use only FIPS 140-3 validated key exchange algorithms.

Information

Without cryptographic integrity protections provided by FIPS-validated cryptographic algorithms, information can be viewed and altered by unauthorized users without detection.

AlmaLinux OS 9 incorporates systemwide crypto policies by default. The SSH configuration file has no effect on the ciphers, MACs, or algorithms unless specifically defined in the /etc/sysconfig/sshd file. The employed algorithms can be viewed in the /etc/crypto-policies/back-ends/opensshserver.config file.

The system will attempt to use the first algorithm presented by the client that matches the server list. Listing the values "strongest to weakest" is a method to ensure the use of the strongest algorithm available to secure the SSH connection.

Solution

Configure the AlmaLinux OS 9 SSH server to use only FIPS 140-3 approved algorithms by updating the "/etc/crypto-policies/back-ends/opensshserver.config" file with the following commands:

Note: Before enabling FIPS mode, ensure that the dracut-fips package is installed on the system.

Enable FIPS mode by updating the system's crypto policy with the following command:
$ sudo update-crypto-policies --set FIPS

Note: If FIPS mode has never been enabled on the system, additional steps will need to be conducted. Refer to vendor documentation.

To manually update the Key Exchange Algorithms in the systemwide SSH configuration, use the following command:

$ sudo sed -i -E '/^KexAlgorithms/s/.*/KexAlgorithms ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256/' "$(readlink -f /etc/crypto-policies/back-ends/opensshserver.config)"

Reboot the system for the changes to take effect.

See Also

https://workbench.cisecurity.org/benchmarks/0

Item Details

Category: ACCESS CONTROL

References: 800-53|AC-17(2), CAT|II, CCI|CCI-001453, Rule-ID|SV-269117r1049999_rule, STIG-ID|ALMA-09-003325, Vuln-ID|V-269117

Plugin: Unix

Control ID: a7629dc4191f0138deafe9cbe8a74010e6a8f8be9747c31d03d97e05d2128cca