[erlang-questions] ssh:connect "Key exchange failed"
Hans Nilsson R
Tue Oct 8 10:47:11 CEST 2019
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