Skip to content

Commit

Permalink
chore: adding timeout to ssh config
Browse files Browse the repository at this point in the history
  • Loading branch information
fracasula committed Feb 20, 2023
1 parent 995cd3f commit c93ac44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion services/streammanager/kafka/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ func New(network string, addresses []string, conf Config) (*Client, error) {
return nil, fmt.Errorf("cannot parse SSH private key: %w", err)
}

sshConfig := &ssh.ClientConfig{User: conf.SSHConfig.User, Auth: []ssh.AuthMethod{ssh.PublicKeys(signer)}}
sshConfig := &ssh.ClientConfig{
User: conf.SSHConfig.User,
Auth: []ssh.AuthMethod{ssh.PublicKeys(signer)},
Timeout: conf.DialTimeout,
}
if conf.SSHConfig.AcceptAnyHostKey {
sshConfig.HostKeyCallback = ssh.InsecureIgnoreHostKey()
}
Expand Down

0 comments on commit c93ac44

Please sign in to comment.