The reconstructed evaluation script behind this rule's OVAL check(s) — every module a compound check combines, with this rule's own concrete values and DISA's SCC tool's real per-module mechanism curated from static teardown of SCC releases.
#!/bin/bash
# Reconstructed from oval:mil.disa.fso.rhel11:def:335
# The SSH client must be configured to not use Cipher-Block Chaining (CBC)-based ciphers.
# Per-module read mechanism curated from static teardown of DISA's SCC tool
# (SCAP Compliance Checker) -- see the SCC Automation Reference above.
# SSH client is configured to use non-CBC mode encryption and the Ciphers keyword is not commented out in the SSH client configuration file
# textfilecontent54_object (textfilecontent54_test)
test_1() {
! ( grep -Pq '^[
]*[Cc][Ii][Pp][Hh][Ee][Rr][Ss]([ -~]*cbc\b|[
]*$)' '/etc/ssh/ssh_config' &>/dev/null )
}
# SSH client is configured to use non-CBC mode encryption and the Ciphers keyword is not commented out in the SSH client configuration file
# textfilecontent54_object (textfilecontent54_test)
test_2() {
grep -Pq '^[
]*[Cc][Ii][Pp][Hh][Ee][Rr][Ss][ -~]+[
]*$' '/etc/ssh/ssh_config' &>/dev/null
}
if ( test_1 && test_2 ); then
echo "PASS"
else
echo "FAIL"
fi Assessment Script Powered by AISandbox-executed
A standalone Shell script to assess this control automatically. Review before running it in your environment.
Syntax-checked and actually executed in an isolated sandbox (not the real system this checks) — confirmed to run without errors.
#!/bin/sh
# OVAL Definition: oval:mil.disa.fso.rhel11:def:335
if [ ! -f "/etc/ssh/ssh_config" ]; then echo "PASS"; exit 0; fi
grep -qE "^[ \t\n\r]*[Cc][Ii][Pp][Hh][Ee][Rr][Ss]([ -~]*cbc\\b|[ \t\n\r]*$)" /etc/ssh/ssh_config && echo "FAIL"; exit 1
grep -qE "^[ \t\n\r]*[Cc][Ii][Pp][Hh][Ee][Rr][Ss][ -~]+[ \t\n\r]*$" /etc/ssh/ssh_config && echo "PASS"; exit 0
echo "PASS"; exit 0