Skip to content

Commit 2e2f32d

Browse files
chore: handle more ssh network error (#1029) (#1030)
(cherry picked from commit 4aa055c) Co-authored-by: Tanmoy Sarkar <[email protected]>
1 parent 8a0d4a9 commit 2e2f32d

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

ssh_toolkit/errors.go

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,26 @@ var errorsWhenSSHClientNeedToBeRecreated = []string{
66
"dial timeout",
77
"i/o timeout",
88
"session creation timeout",
9-
"failed to dial ssh",
9+
"session failed",
10+
"failed to dial",
11+
"unable to dial",
1012
"handshake failed",
13+
"password auth failed",
14+
"keyboard-interactive failed",
1115
"unable to authenticate",
16+
"server got error",
17+
"client could not authenticate",
1218
"connection refused",
1319
"use of closed network connection",
14-
"rejected: too many authentication failures",
15-
"rejected: connection closed by remote host",
16-
"rejected: connect failed",
20+
"many authentication failures",
21+
"connection closed by remote host",
22+
"connect failed",
1723
"open failed",
1824
"handshake failed",
25+
"subsystem request failed",
1926
"EOF",
27+
"broken pipe",
28+
"closing write end of pipe",
2029
}
2130

2231
func isErrorWhenSSHClientNeedToBeRecreated(err error) bool {

0 commit comments

Comments
 (0)