SV-274046r1120126_rule
V-274046
SRG-OS-000423-GPOS-00187
AZLX-23-001225
CAT I
10
Configure Amazon Linux 2023 to force a frequent session key renegotiation for SSH connections to the server by adding or modifying the following line in the "/etc/ssh/sshd_config" file or in a file in "/etc/ssh/sshd_config.d":
RekeyLimit 1G 1h
Restart the SSH daemon for the settings to take effect.
$ sudo systemctl restart sshd.service
Verify Amazon Linux 2023 is configured so that the SSH forces frequent session key renegotiation with the following command:
$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*rekeylimit'
RekeyLimit 1G 1h
If "RekeyLimit" does not have a maximum data amount and maximum time defined, is missing, or is commented out, this is a finding.
V-274046
False
AZLX-23-001225
Verify Amazon Linux 2023 is configured so that the SSH forces frequent session key renegotiation with the following command:
$ sudo /usr/sbin/sshd -dd 2>&1 | awk '/filename/ {print $4}' | tr -d '\r' | tr '\n' ' ' | xargs sudo grep -iH '^\s*rekeylimit'
RekeyLimit 1G 1h
If "RekeyLimit" does not have a maximum data amount and maximum time defined, is missing, or is commented out, this is a finding.
M
5700