Linux distributions
TMA-LNX-SSH-LOGINGRACE
Ensure SSH LoginGraceTime is 60 seconds or less
中等級 1自動化linux
說明
Hardens the SSH daemon directive LoginGraceTime.
檢查方式
稽核方法: Shell 指令
shell
sshd -T 2>/dev/null | awk '/^logingracetime /{ if ($2>0 && $2<=60) print "ok"; else print "bad" }'- 預期輸出
ok
修補方式
修補方法: 檔案編輯
- 檔案
/etc/ssh/sshd_config- 取代行
LoginGraceTime 60
屬性
- 作業系統
- ubuntu-22.04, ubuntu-24.04, rocky-9
- 標籤
- sshserver
- 參考資料
- CIS Linux Benchmark - Services / SSH Server Configuration (verify section number for your distro release)
檢查此主機
請在您有權稽核的機器上執行此指令。掃描為唯讀操作。
shell
tmaegis scan --target linux