Fix ssh outbound

This commit is contained in:
世界 2022-10-09 20:43:01 +08:00
parent de3f70195e
commit 46d7a78158
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -122,6 +122,9 @@ func (s *SSH) connect() (*ssh.Client, error) {
Auth: s.authMethod, Auth: s.authMethod,
ClientVersion: s.clientVersion, ClientVersion: s.clientVersion,
HostKeyAlgorithms: s.hostKeyAlgorithms, 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) clientConn, chans, reqs, err := ssh.NewClientConn(conn, s.serverAddr.Addr.String(), config)
if err != nil { if err != nil {