MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / containsFailedSSHLogMessage

Function containsFailedSSHLogMessage

agent/app/service/ssh.go:1355–1363  ·  view source on GitHub ↗
(line string)

Source from the content-addressed store, hash-verified

1353}
1354
1355func containsFailedSSHLogMessage(line string) bool {
1356 return strings.Contains(line, "Failed ") ||
1357 strings.Contains(line, "Invalid user ") ||
1358 strings.Contains(line, "Connection closed by ") ||
1359 strings.Contains(line, "Disconnected from ") ||
1360 strings.Contains(line, "Received disconnect from ") ||
1361 strings.Contains(line, "maximum authentication attempts exceeded") ||
1362 strings.Contains(line, " not allowed")
1363}
1364
1365func loadSSHLogLines(filePath string) ([]string, error) {
1366 file, err := os.Open(filePath)

Callers 2

shouldParseSSHLogLineFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected