Skip to Content

Failure establishing SSH session: Unable to exchange encryption keys

How to fix the error "Failure establishing SSH session" in ezsh (ezeelogin shell)?


Overview: This article describes resolving the "Failure establishing SSH session" error in ezsh by updating encryption algorithms.


How to fix the error "Failed to establish SSH session"?

This error occurs when a user tries to login to the remote servers that are added in gateway server. Refer below screenshot of the error.

Step 1: Check the ezsh log of the user from the gateway server.

Login to the gateway server as the root user and check the ezsh log of the user.

root@gateway :~# cat /home/{username}/ezsh.log

Failure establishing SSH session: Unable to exchange encryption keys


How to fix the error "Failure establishing SSH session: Unable to exchange encryption keys"?

Step 1: Login to the remote server from the gateway server with level 3 verbose to find out the KEX and Host Key algorithms used. Refer below example of SSH and algorithms.

root@gateway :~# ssh root@remote_server -vvv

debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256

Step 2: Refer below article and replace the KEX and Host Key algorithms that are supported. This will fix the error "Failure establishing SSH session: Unable to exchange encryption keys" in the ezsh (ezeelogin shell).


Related Articles:

Encryption technologies used in ezeelogin.

Kex and Host key algorithms in ssh