Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/utils/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewClient(c ConnInfo) (*SSHClient, error) {
config.Auth = []gossh.AuthMethod{gossh.PublicKeys(signer)}
}
if c.DialTimeOut == 0 {
c.DialTimeOut = 5 * time.Second
c.DialTimeOut = 15 * time.Second
}
config.Timeout = c.DialTimeOut

Expand Down
4 changes: 2 additions & 2 deletions core/utils/ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func NewClient(c ConnInfo) (*SSHClient, error) {
config.Auth = []gossh.AuthMethod{gossh.PublicKeys(signer)}
}
if c.DialTimeOut == 0 {
c.DialTimeOut = 5 * time.Second
c.DialTimeOut = 15 * time.Second
}
config.Timeout = c.DialTimeOut

Expand Down Expand Up @@ -256,7 +256,7 @@ func DialWithTimeout(network, addr string, useProxy bool, config *gossh.ClientCo
if err != nil {
return nil, err
}
_ = conn.SetDeadline(time.Now().Add(config.Timeout))
_ = conn.SetDeadline(time.Now().Add(config.Timeout * 2))
c, chans, reqs, err := gossh.NewClientConn(conn, addr, config)
if err != nil {
return nil, err
Expand Down