TMAegisBeta
Weitere Regeln für linux

Linux distributions

TMA-ALMA9-5.1.22

Ensure sshd PermitUserEnvironment is disabled

MittelStufe 1Automatisiertlinux

Beschreibung

The PermitUserEnvironment option allows users to present environment options to the SSH daemon.

So wird geprüft

Prüfmethode: Shell-Befehl

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 permituserenvironment' 2>&1); printf '%s\n' "$o" | tr -s ' \t' '  ' | sed 's/^ //;s/ $//' | grep -Fxq -- 'permituserenvironment no' || { echo step1: missing 'permituserenvironment no'; return 1; }; }; if alt0; then echo compliant; fi
Erwartete Ausgabe
compliant

So wird behoben

Behebungsmethode: Anleitung oder Infrastruktur-Patch

Edit the /etc/ssh/sshd_config file to set the PermitUserEnvironment parameter to no above any Include entries as follows: PermitUserEnvironment no

Eigenschaften

Betriebssysteme
almalinux-9
Tags
cis-convertedlinux
Referenz
CIS AlmaLinux OS 9 Benchmark v3.0.0 - 5.1.22

Diesen Host prüfen

Führen Sie dies auf einem Rechner aus, den Sie prüfen dürfen. Der Scan ist schreibgeschützt.

shell
tmaegis scan --target linux