TMAegisBeta
Više pravila za linux

Linux distributions

TMA-RHEL10-5.1.11

Ensure sshd IgnoreRhosts is enabled

SrednjaNivo 1Automatskalinux

Opis

The IgnoreRhosts parameter specifies that .rhosts and .shosts files will not be used in RhostsRSAAuthentication or HostbasedAuthentication.

Kako se proverava

Metod provere: Komanda ljuske

shell
alt0() { command -v grep >/dev/null 2>&1 || { echo "step1: grep not installed"; return 1; }; command -v sshd >/dev/null 2>&1 || { echo "step1: sshd not installed"; return 1; }; o=$(bash -c 'sshd -T | grep ignorerhosts' 2>&1); printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- 'ignorerhosts yes' || { echo step1: missing 'ignorerhosts yes'; return 1; }; }; if alt0; then echo compliant; fi
Očekivani izlaz
compliant

Kako se ispravlja

Metod ispravke: Smernica ili zakrpa infrastrukture

Edit the /etc/ssh/sshd_config file to set the IgnoreRhosts parameter to yes above any Include entry as follows: IgnoreRhosts yes Note: First occurrence of a option takes precedence. If Include locations are enabled, used, and order of precedence is understood in your environment, the entry may be created in a file in Include location.

Svojstva

Operativni sistemi
rhel-10
Oznake
cis-convertedlinux
Referenca
CIS Red Hat Enterprise Linux 10 Benchmark v1.0.1 - 5.1.11

Proverite ovaj računar

Pokrenite ovo na računaru za koji imate dozvolu za proveru. Skeniranje radi u režimu samo za čitanje.

shell
tmaegis scan --target linux