ssh2_connect():启动SSH连接时出错(-8):无法交换加密密钥

时间:2015-05-27 14:01:28

标签: encryption ssh-keys libssh2

我正在使用libssh2进行编码以连接华为路由器。在某些路由器上工作正常,在其他路由器上只是回显此错误:

"警告:ssh2_connect():启动SSH连接时出错(-8):无法在(...)"中交换加密密钥。

我在相同的路由器上使用了putty,会话日志是相同的:

2015-05-27 12:02:19 Server version: SSH-2.0-HUAWEI-1.5
2015-05-27 12:02:19 Using SSH protocol version 2
2015-05-27 12:02:19 We claim version: SSH-2.0-PuTTY_Release_0.63
2015-05-27 12:02:19 Doing Diffie-Hellman group exchange
2015-05-27 12:02:19 Doing Diffie-Hellman key exchange with hash SHA-1
2015-05-27 12:02:32 Host key fingerprint is:
2015-05-27 12:02:32 ssh-rsa 512 8a:07:9a:28:1d:4d:22:4c:18:35:4f:18:eb:ba:9e:b3
2015-05-27 12:02:32 Initialised AES-128 CBC client->server encryption
2015-05-27 12:02:32 Initialised HMAC-SHA1 client->server MAC algorithm
2015-05-27 12:02:32 Initialised AES-128 CBC server->client encryption
2015-05-27 12:02:32 Initialised HMAC-SHA1 server->client MAC algorithm
你能帮帮我吗? 谢谢!

0 个答案:

没有答案