(err error)
| 667 | } |
| 668 | |
| 669 | func IsAuthError(err error) bool { |
| 670 | if err == nil { |
| 671 | return false |
| 672 | } |
| 673 | errMsg := strings.ToLower(err.Error()) |
| 674 | return messageContainsAny(errMsg, |
| 675 | "unable to authenticate", |
| 676 | "no supported methods remain", |
| 677 | "ssh: handshake failed", |
| 678 | ) |
| 679 | } |
| 680 | |
| 681 | // IsKeyParseError checks if the error is due to a corrupt or invalid private key file |
| 682 | func IsKeyParseError(err error) bool { |
no test coverage detected