TMAegis
更多 ros 規則

TMA-ROS1-5.2.11

Ensure SSH PermitEmptyPasswords is disabled

高等級 1自動化ros

說明

The PermitEmptyPasswords parameter specifies if the SSH server allows login to accounts with empty password strings. The audit requires PermitEmptyPasswords no. The audit reads the effective sshd configuration (sshd -T, root). Host-level control from the CIS ROS Melodic benchmark (Ubuntu 18.04 robot hosts); run as root.

檢查方式

稽核方法: Shell 指令

shell
command -v sshd >/dev/null 2>&1 || exit 1
out=$(sshd -T -C user=root -C host="$(hostname)" -C addr="$(hostname -I 2>/dev/null | cut -d' ' -f1)" 2>/dev/null) || out=$(sshd -T 2>/dev/null) || exit 1
v=$(printf '%s\n' "$out" | awk 'tolower($1)=="permitemptypasswords"{print tolower($2); exit}')
case "$v" in no) echo compliant ;; *) echo "PermitEmptyPasswords ${v:-unset}" ;; esac
預期輸出
compliant

修補方式

修補方法: 操作指南或基礎設施修補檔

Edit the /etc/ssh/sshd_config file to set the parameter as follows: PermitEmptyPasswords no

屬性

作業系統
不限
標籤
rosros1melodicaccess-control
參考資料
CIS ROS Melodic Benchmark v1.0.0 - 5.2.11 Ensure SSH PermitEmptyPasswords is disabled

檢查此主機

請在您有權稽核的機器上執行此指令。掃描為唯讀操作。

shell
tmaegis scan --target ros