Skip to content

Commit

Permalink
feat(scanner): skip ssh config validation if G option is unknown opti…
Browse files Browse the repository at this point in the history
…on (#1632)
  • Loading branch information
MaineK00n authored Apr 4, 2023
1 parent e506125 commit abdb081
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,10 @@ func validateSSHConfig(c *config.ServerInfo) error {
logging.Log.Debugf("Executing... %s", strings.Replace(sshConfigCmd, "\n", "", -1))
configResult := localExec(*c, sshConfigCmd, noSudo)
if !configResult.isSuccess() {
if strings.Contains(configResult.Stderr, "unknown option -- G") {
logging.Log.Warn("SSH configuration validation is skipped. To enable validation, G option introduced in OpenSSH 6.8 must be enabled.")
return nil
}
return xerrors.Errorf("Failed to print SSH configuration. err: %w", configResult.Error)
}
sshConfig := parseSSHConfiguration(configResult.Stdout)
Expand Down

0 comments on commit abdb081

Please sign in to comment.