From 46d7a78158ad1fef1059a9c17392cd0174a53b7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 9 Oct 2022 20:43:01 +0800 Subject: [PATCH] Fix ssh outbound --- outbound/ssh.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/outbound/ssh.go b/outbound/ssh.go index 23187270..48d51a78 100644 --- a/outbound/ssh.go +++ b/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 {