Troubleshooting SSH Public Key authentication Exception: Key exchange failure

Troubleshooting SSH Public Key authentication Exception: Key exchange failure

When executing the SSH troubleshoot script in your server, if you encounter an exception as shown below, follow the steps given to troubleshoot the error:

Sample Trace
com.adventnet.appmanager.server.hostresources.util.PublicKeyConnect.main(PublicKeyConnect.java:83) 
Caused by: com.maverick.ssh.SshException: Key exchange failed: Expected SSH_MSG_KEX_GEX_GROUP [id=3] [Unknown cause] 
at com.maverick.ssh.components.jce.client.DiffieHellmanGroupExchangeSha1.performClientExchange(DiffieHellmanGroupExchangeSha1.java:223)

Steps:

1. Add the below two lines in sshd_config file present in the /etc/ssh directory.
HostKeyAlgorithms ssh-dss,ssh-rsa 
KexAlgorithms diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1 
2. Restart the SSH server.
                  New to ADManager Plus?

                    New to ADSelfService Plus?

                      • Related Articles

                      • How can I generate SSH key for public key based authentication in server monitors?

                        To monitor a Unix server via Public Key Authentication in SSH mode, you need to generate a set of RSA or DSA key pairs. To generate RSA or DSA SSH key pairs: For windows, you can use a free tool like PuTTYgen. For Linux, you can use ssh-keygen ...
                      • Troubleshoot SSH key based authentication failures

                        Follow the suggestions given below to troubleshoot SSH key based authentication failures Check server availability. Click here to know how to check server availability in Applications Manager Verify if you have specified the correct command prompt ...
                      • Troubleshooting Authentication Failed error

                        Authentication Failure Authentication failure occurs when the request to a resource is missing or has invalid credentials.  Check if URL requires authentication Access the URL in an incognito/private window and check if any pop up asking for ...
                      • Troubleshooting Server Authentication Failures in Applications Manager

                        If you encounter authentication failures in server monitors in Applications Manager, refer and choose the links from the below list to troubleshoot the issue. You can choose the troubleshooting steps based on the type of authentication failure. ...
                      • Real User Monitor (RUM) - Troubleshooting

                        If the monitor has not polled data for a long time, follow the steps below for troubleshooting: Step 1: Check prerequisites to be done Real User Monitor requires the RUM Agent to be installed and mapped to the Applications Manager. Refer the help ...