macOS APPL-26-001150
DISA STIG recommends
APPL-26-001150 CAT I
The macOS system must disable password authentication for SSH.
NIST SP 800-53: IA-2, IA-2(1), IA-2(2), IA-2(6), IA-2(8), IA-5(2), MA-4
mSCP rule auth_ssh_password_authentication_disable · in 800-171, 800-53r5_high, 800-53r5_low, 800-53r5_moderate, DISA-STIG, all_rules, cisv8, cmmc_lvl1…
Check
Verify the macOS system is configured to disable password authentication for SSH with the following command: /usr/sbin/sshd -G | /usr/bin/grep -Ec '^(passwordauthentication\s+no|kbdinteractiveauthentication\s+no)' If the result is not "2", this is a finding.
Fix
Configure the macOS system to disable password authentication for SSH with the following command: include_dir=$(/usr/bin/awk '/^Include/ {print $2}' /etc/ssh/sshd_config | /usr/bin/tr -d '*') if [[ -z $include_dir ]]; then /usr/bin/sed -i.bk "1s/.*/Include \/etc\/ssh\/sshd_config.d\/\*/" /etc/ssh/sshd_config fi echo "passwordauthentication no" >> "${include_dir}01-mscp-sshd.conf" echo "kbdinteractiveauthentication no" >> "${include_dir}01-mscp-sshd.conf" for file in $(ls ${include_dir}); do if [[ "$file" == "100-macos.conf" ]]; then continue fi if [[ "$file" == "01-mscp-sshd.conf" ]]; then break fi /bin/mv ${include_dir}${file} ${include_dir}20-${file} done
Our decision
Apply as published
No decision recorded: the recommendation stands. The owner signs in to change it.
All macOS decisions · The macOS baseline · The macOS test plan