[erlang-questions] ssh:connect "Key exchange failed"
Tue Oct 8 14:36:26 CEST 2019
I tried it with several OTP releases up to 21. I have not tried OTP 22.
Here is what I received with telnet:
QþCb8é¢ê~x|qâob'gss-group1-sha1-toWM5Slw5Ew8Mqkay+al2g==,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1ssh-rsa,ssh-dss aes256-cbc,aes192-cbc,aes128-cbc aes256-cbc,aes192-cbc,aes128-cbchmac-sha1-96,hmac-md5-96hmac-sha1-96,hmac-md5-96 none,zlib none,zlib
es,i-defaultConnection closed by foreign host.
And these are the default algorithms:
From: Hans Nilsson R <hans.r.nilsson@REDACTED>
Sent: Tuesday, 8 October, 2019 10:47
To: József Bérces <jozsef.berces@REDACTED>; Erlang Questions <erlang-questions@REDACTED>
Subject: Sv: ssh:connect "Key exchange failed"
The "Key exchange failed" error indicates that there is no agreement in the first phase where different algorithms are negotiated.
A common cause is that there are no common cipher algorithm available. For example the AES-256 CBC is not available in Erlang SSH.
Which otp version do you use?
What does the function ssh:default_algorithms() return?
What algorithms does the server provide? (Check by telnet the server, type "SSH-2.0-xxx" and look at the funny characters that is returned. Or post them here)
Från: erlang-questions-bounces@REDACTED <erlang-questions-bounces@REDACTED> för József Bérces <jozsef.berces@REDACTED>
Skickat: den 8 oktober 2019 09:23
Till: Erlang Questions <erlang-questions@REDACTED>
Ämne: [erlang-questions] ssh:connect "Key exchange failed"
I need to connect to an ssh server but ssh:connect always returns "Key exchange failed". I can connect with KiTTY, and checking the KiTTY logs I suspect that the problem is the 1024-bit RSA key.
Could you please check the KiTTY log below what is not supported by the Erlang SSH client?
Is there any way to add the missing support to the Erlang SSH client so that I could connect to this server?
2019-10-07 14:37:58 Starting 42264 from XXXXX@REDACTED
2019-10-07 14:38:07 Connecting to 10.XXX.XXX.XXX port 22
2019-10-07 14:38:07 We claim version: SSH-2.0-PuTTY_KiTTY
2019-10-07 14:38:07 Server version: SSH-2.0-Sun_SSH_1.1.5
2019-10-07 14:38:07 Using SSH protocol version 2
2019-10-07 14:38:08 Doing Diffie-Hellman group exchange
2019-10-07 14:38:08 Doing Diffie-Hellman key exchange with hash SHA-1
2019-10-07 14:38:08 Server also has ssh-dss host key, but we don't know it
2019-10-07 14:38:08 Host key fingerprint is:
2019-10-07 14:38:08 ssh-rsa 1024 XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
2019-10-07 14:38:16 Initialised AES-256 CBC client->server encryption
2019-10-07 14:38:16 Initialised HMAC-SHA1-96 client->server MAC algorithm
2019-10-07 14:38:16 Initialised AES-256 CBC server->client encryption
2019-10-07 14:38:16 Initialised HMAC-SHA1-96 server->client MAC algorithm
2019-10-07 14:38:22 Using SSPI from SECUR32.DLL
2019-10-07 14:38:22 Attempting GSSAPI authentication
2019-10-07 14:38:22 GSSAPI authentication initialisation failed
2019-10-07 14:38:22 The target was not recognized.
2019-10-07 14:38:22 Attempting keyboard-interactive authentication
2019-10-07 14:38:30 Access granted
2019-10-07 14:38:30 Opening session as main channel
2019-10-07 14:38:30 Opened main channel
2019-10-07 14:38:30 Allocated pty (ospeed 38400bps, ispeed 38400bps)
2019-10-07 14:38:31 Started a shell/command
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions