【发布时间】:2017-05-30 20:09:02
【问题描述】:
我是 GoLang 的新手,我正在尝试使用 go 连接到远程服务器。但我不断收到以下错误
Failed to dial: ssh: handshake failed: ssh: no common algorithm for key exchange; client offered: [curve2****-sh****@libssh.org ****-sha*-nis****ecdh-sha2-nistp384 ecdh-sha2-nistp**** diffie-hellman-group14-sha1 diffie-hellman-group1-sha1], server offered: [diffie-hellman-group-exchange-sha***]
下面是我用来连接的配置
config := &ssh.ClientConfig{
User: user,
HostKeyCallback: nil,
Auth: []ssh.AuthMethod{
publicKey,
},
}
【问题讨论】: