Skip to content

Commit

Permalink
Optimize the error message for sshd configuration relate.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samson-W committed Nov 4, 2020
1 parent 822d6ef commit 7eb3f18
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bin/hardening/9.3.10_disable_sshd_setenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.14_ssh_banner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.15_sshd_printlastlog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.16_sshd_IgnoreUserKnownHosts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.17_sshd_GSSAPIAuthentication.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.18_sshd_KerberosAuthentication.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.19_sshd_StrictModes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.20_sshd_compression.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.25_sshd_logingracetime.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.2_sshd_loglevel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.4_disable_x11_forwarding.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.5_sshd_maxauthtries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.6_enable_sshd_ignorerhosts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.8_disable_root_login.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down
2 changes: 1 addition & 1 deletion bin/hardening/9.3.9_disable_sshd_permitemptypasswords.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ audit () {
ok "The value of keyword $SSH_PARAM has set to $SSH_VALUE, it's correct."
FNRET=0
else
crit "The keyword $SSH_PARAM does not exist in the sshd runtime configuration."
crit "The keyword value pair "\"$SSH_PARAM $SSH_VALUE\"" does not exist in the sshd runtime configuration."
PATTERN="^$SSH_PARAM[[:space:]]*"
PATTERN_INFO="$SSH_PARAM $SSH_VALUE"
does_pattern_exist_in_file $FILE "$PATTERN"
Expand Down

0 comments on commit 7eb3f18

Please sign in to comment.