RHEL9 CIS Missing sshd configurations: [KexAlgorithms]
Symptom
Some implementations of CIS hardening on RHEL9 (and above) will override PTA's SSHD hardening.
PTA does not directly modify sshd_config but instead relies on Include files and their priority. PTA creates the file
/etc/ssh/sshd_config.d/02-pta.conf
Environment
14.4;14.6 Privilege Threat Analytics (PTA) PTA
PTA 14.4 and higher
ONLY
RHEL 9 CIS hardened, or wherever a customer has modified sshd_config
Cause
CIS Hardening scripts add a less secure 'KexAlgorithms' directive to the top of sshd_config.
sshd_config directives are locked in the order they are read, so after the first directive for a given variable, all others are ignored.
Resolution
The customer can modify the sshd_config directly to their liking to suit their needs.
At the time of writing, below are the PTA hardening settings for SSHD
#PTA SSHD HARDENING
Ciphers aes256-ctr,aes192-ctr,aes128-ctr
MACs hmac-sha2-512,hmac-sha2-256
KexAlgorithms diffie-hellman-group-exchange-sha256
GSSAPIAuthentication no