Jelajahi Sumber

Fix ssh outbound

世界 3 tahun lalu
induk
melakukan
f5b15b392b
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      outbound/ssh.go

+ 3 - 0
outbound/ssh.go

@@ -122,6 +122,9 @@ func (s *SSH) connect() (*ssh.Client, error) {
 		Auth:              s.authMethod,
 		ClientVersion:     s.clientVersion,
 		HostKeyAlgorithms: s.hostKeyAlgorithms,
+		HostKeyCallback: func(hostname string, remote net.Addr, key ssh.PublicKey) error {
+			return nil
+		},
 	}
 	clientConn, chans, reqs, err := ssh.NewClientConn(conn, s.serverAddr.Addr.String(), config)
 	if err != nil {