SV-274047r1120129_rule
V-274047
SRG-OS-000105-GPOS-00052
AZLX-23-001230
CAT II
10
Configure Amazon Linux 2023 to use public key authentication for SSHD by adding or modifying the following line in "/etc/ssh/sshd_config" or in a file in "/etc/ssh/sshd_config.d".
PubkeyAuthentication yes
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 daemon accepts public key encryption with the following command:
$ sudo grep -ir PubkeyAuthentication /etc/ssh/sshd_config /etc/ssh/sshd_config.d/
/etc/ssh/sshd_config:#PubkeyAuthentication yes
/etc/ssh/sshd_config.d/90-PubkeyAuth:PubkeyAuthentication yes
If "PubkeyAuthentication" is set to no, the line is commented out, or the line is missing, this is a finding.
V-274047
False
AZLX-23-001230
Verify Amazon Linux 2023 is configured so that the SSH daemon accepts public key encryption with the following command:
$ sudo grep -ir PubkeyAuthentication /etc/ssh/sshd_config /etc/ssh/sshd_config.d/
/etc/ssh/sshd_config:#PubkeyAuthentication yes
/etc/ssh/sshd_config.d/90-PubkeyAuth:PubkeyAuthentication yes
If "PubkeyAuthentication" is set to no, the line is commented out, or the line is missing, this is a finding.
M
5700