diff --git a/include/tests_ssh b/include/tests_ssh index 3d6d5b8c..45957ebe 100644 --- a/include/tests_ssh +++ b/include/tests_ssh @@ -99,16 +99,12 @@ X11Forwarding:NO,,YES\ PrintLastLog:YES,,NO" - for I in ${SSHOPS}; - do + for I in ${SSHOPS}; do OPTIONNAME=`echo ${I} | cut -d ':' -f1` - EXPECTEDVALUE=`echo ${I} | cut -d ':' -f2 | cut -d',' -f1` MEDIUMSCOREDVALUE=`echo ${I} | cut -d ':' -f2 | cut -d',' -f2` WRONGVALUE=`echo ${I} | cut -d ':' -f2 | cut -d',' -f3` - FOUNDVALUE=`awk -v OPT="${OPTIONNAME}" 'index($0, OPT) == 1 { print toupper($2) }' ${SSH_DAEMON_CONFIG}` - logtext "Test: Checking ${OPTIONNAME} in ${SSH_DAEMON_CONFIG}" if [ ! "${FOUNDVALUE}" = "" ]; then @@ -119,23 +115,21 @@ logtext "Result: SSH option ${OPTIONNAME} is configured very well" Display --indent 4 --text "- SSH option: ${OPTIONNAME}" --result OK --color GREEN AddHP 3 3 - elif [ "${FOUNDVALUE}" = "${MEDIUMSCOREDVALUE}" ]; then logtext "Result: SSH option ${OPTIONNAME} is configured totally wrong" - ReportSuggestion ${TEST_NO} "Harder SSH option: ${OPTIONNAME}" + ReportSuggestion ${TEST_NO} "Consider hardening of SSH configuration" "${OPTIONNAME}" "-" Display --indent 4 --text "- SSH option: ${OPTIONNAME}" --result "MEDIUM" --color YELLOW AddHP 1 3 - elif [ "${FOUNDVALUE}" = "${WRONGVALUE}" ]; then logtext "Result: SSH option ${OPTIONNAME} is configured totally wrong" - ReportWarning ${TEST_NO} "M" "Unsafe configured SSH option: ${OPTIONNAME}" - ReportSuggestion ${TEST_NO} "Reconfigure ${OPTIONNAME}" + #ReportWarning ${TEST_NO} "M" "Unsafe configured SSH option: ${OPTIONNAME}" + ReportSuggestion ${TEST_NO} "Consider hardening SSH configuration" "${OPTIONNAME}" "-" Display --indent 4 --text "- SSH option: ${OPTIONNAME}" --result WARNING --color RED AddHP 0 3 - else logtext "Result: Value of SSH option ${OPTIONNAME} is unknown (not defined)" Display --indent 4 --text "- SSH option: ${OPTIONNAME}" --result DEFAULT --color WHITE + #ReportException "SSH-7408:01" "Unknown SSH option" fi else