Skip to content

Commit

Permalink
ssh: Specify HostKeyCallback in ClientConfig
Browse files Browse the repository at this point in the history
Since golang/go#19767 SSH
library requires this field on each connection.

Currently all new installations of sup via `go get`
doesn't work at all.
This commit fixes it.
  • Loading branch information
zimnx committed Dec 13, 2019
1 parent be6dff4 commit de24929
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@ func (c *SSHClient) ConnectWith(host string, dialer SSHDialFunc) error {
Auth: []ssh.AuthMethod{
authMethod,
},
HostKeyCallback: func(hostname string, remote net.Addr, key ssh.PublicKey) error {
return nil
},
}

c.conn, err = dialer("tcp", c.host, config)
Expand Down

0 comments on commit de24929

Please sign in to comment.