Skip to content

Commit

Permalink
increase timeout for syscall.DisallowedSSHConnectionNonStandardPort
Browse files Browse the repository at this point in the history
Signed-off-by: Predrag Rogic <[email protected]>
  • Loading branch information
prezha authored and poiana committed Sep 23, 2024
1 parent 3604216 commit f0a403c
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ func DisallowedSSHConnectionNonStandardPort(h events.Helper) error {
}

// note: executing the following command might fail, but enough to trigger the rule, so we ignore any error
if err := runCmd(context.Background(), 1*time.Second, ssh, "[email protected]", "-p", "443"); err != nil {
// in some cases it takes more than one second to establish the connection
if err := runCmd(context.Background(), 5*time.Second, ssh, "[email protected]", "-p", "443"); err != nil {
h.Log().WithError(err).Debug("failed to run ssh command (this is expected)")
}

Expand Down

0 comments on commit f0a403c

Please sign in to comment.