Skip to content

Commit ff129c2

Browse files
committed
ssh: Specify HostKeyCallback in ClientConfig
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.
1 parent bb8484d commit ff129c2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ssh.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ func (c *SSHClient) ConnectWith(host string, dialer SSHDialFunc) error {
139139
Auth: []ssh.AuthMethod{
140140
authMethod,
141141
},
142+
HostKeyCallback: func(hostname string, remote net.Addr, key ssh.PublicKey) error {
143+
return nil
144+
},
142145
}
143146

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

0 commit comments

Comments
 (0)