Skip to content

Commit

Permalink
chore: handle more ssh network error (#1029) (#1030)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4aa055c)

Co-authored-by: Tanmoy Sarkar <[email protected]>
  • Loading branch information
mergify[bot] and tanmoysrt authored Sep 23, 2024
1 parent 8a0d4a9 commit 2e2f32d
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions ssh_toolkit/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,26 @@ var errorsWhenSSHClientNeedToBeRecreated = []string{
"dial timeout",
"i/o timeout",
"session creation timeout",
"failed to dial ssh",
"session failed",
"failed to dial",
"unable to dial",
"handshake failed",
"password auth failed",
"keyboard-interactive failed",
"unable to authenticate",
"server got error",
"client could not authenticate",
"connection refused",
"use of closed network connection",
"rejected: too many authentication failures",
"rejected: connection closed by remote host",
"rejected: connect failed",
"many authentication failures",
"connection closed by remote host",
"connect failed",
"open failed",
"handshake failed",
"subsystem request failed",
"EOF",
"broken pipe",
"closing write end of pipe",
}

func isErrorWhenSSHClientNeedToBeRecreated(err error) bool {
Expand Down

0 comments on commit 2e2f32d

Please sign in to comment.