Linux distributions
CIS-UBUNTU-5.2.8
Ensure SSH root login is disabled
YüksekDüzey 1Otomatiklinux
Açıklama
The PermitRootLogin parameter specifies if the root user can log in using ssh.
Nasıl denetlenir
Denetim yöntemi: Dosya deseni
- Dosya
/etc/ssh/sshd_config- Desen
(?m)^\s*PermitRootLogin\s+no\b
Nasıl düzeltilir
Düzeltme yöntemi: Kabuk komutu
shell
sed -i 's/^#*PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_configÖzellikler
- İşletim sistemleri
- ubuntu-22.04, ubuntu-24.04, rocky-9
- Etiketler
- sshserver
- Referans
- CIS Ubuntu Linux / Rocky Linux Benchmarks - Ensure sshd PermitRootLogin is disabled (verify section number for your release)
Bu ana makineyi denetle
Bunu denetleme izniniz olan bir makinede çalıştırın. Tarama salt okunurdur.
shell
tmaegis scan --target linux