macOS
TMA-MACOS15-2.3.3.4
Ensure Remote Login Is Disabled
CaoCấp 1Tự độngmacos
Mô tả
Remote Login allows an interactive terminal connection to a computer. Audit: All three benchmark checks must pass: systemsetup reports Off, sshd is disabled in launchd and not running.
Cách kiểm tra
Phương pháp kiểm tra: Lệnh shell
shell
a=$(/usr/sbin/systemsetup -getremotelogin 2>/dev/null) || exit 1
b=$(/bin/launchctl print-disabled system 2>/dev/null | /usr/bin/grep -c '"com.openssh.sshd" => disabled')
c=$(/bin/launchctl list 2>/dev/null | /usr/bin/grep -c "com.openssh.sshd")
if printf '%s' "$a" | /usr/bin/grep -q "Remote Login: Off" && [ "$b" -eq 1 ] && [ "$c" -eq 0 ]; then echo compliant; else echo "$a; disabled=$b; running=$c"; fi- Đầu ra mong đợi
compliant
Cách khắc phục
Phương pháp khắc phục: Hướng dẫn hoặc bản vá hạ tầng
Terminal: sudo /usr/sbin/systemsetup -setremotelogin off. GUI: System Settings > General > Sharing > Set Remote Login to disabled.
Thuộc tính
- Hệ điều hành
- macos-15
- Thẻ
- macossystem-settings
- Tham chiếu
- CIS Apple macOS 15.0 Sequoia Benchmark v2.1.0 - 2.3.3.4 Ensure Remote Login Is Disabled
Kiểm tra máy này
Chạy lệnh này trên máy bạn được phép kiểm tra. Lần quét chỉ ở chế độ đọc.
shell
tmaegis scan --target macos