Cannot connect, status is SSH_CONNECTION_FAILURE. Could not agree on key exchange algorithm


Details

Getting Key access algorithm error while running discovery on UNIX devices

Error:

Cannot connect, status is SSH_CONNECTION_FAILURE. Could not agree on key exchange algorithm
Client: [diffie-hellman-group-exchange-sha1, diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha256, diffie-hellman-group1-sha1]
Server: []

Cause:

In Paris release, Servicenow SNCSSH supports the following ciphers/MAC/Kex listed below.

- Key Exchange Algorithms: diffie-hellman-group-exchange-sha1, diffie-hellman-group14-sha1, diffie-hellman-group-exchange-sha256, diffie-hellman-group1-sha1
- Signature Algorithms: ssh-dss, ssh-rsa
- Client-to-Server Cipher Algorithms: aes128-ctr, aes192-ctr, aes256-ctr, 3des-ctr, aes128-cbc, aes192-cbc, aes256-cbc, 3des-cbc, none
- Client-to-Server MAC Algorithms: hmac-sha1, hmac-sha1-96, hmac-sha2-256, hmac-sha2-512, hmac-md5, hmac-md5-96
- Client-to-Server Compression Algorithms: none

As in Paris, SNCSSH does not support the below "KexAlgorithms" 
KexAlgorithms curve25519-sha256,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp256,diffie-hellman-group14-sha256,diffie-hellman-group16-sha512

 

Support for more key-exchange algorithms are added in Quebec release.

Please refer to doc below:

https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/product/mid-server/reference/mid-ssh-algorithms.html