Using Xagent leads to error "Too many authentication failures for root (code: 2)"

PROBLEM DESCRIPTION


When using Xagent to connect to an Xshell session, the user receives the following error:







RESOLUTION


During authentication, SSH Agents, including Xagent, continuously provide their keys one by one until a proper key matches. However, every SSH server limits the number of authentication attempts allowed. If too many unsuccessful auth attempts are made and the limit is reached, the ssh server will disconnect the session.

You can choose either to increase the limit of the ssh server or reduce the number of keys for Xagent, or both. To increase the limit, you'll need to configure your sshd_config files in your ssh server.
Once in your sshd_config file, increase "MaxAuthTries" to a desired number which represents the limit of failed auth attempts before the session disconnects. The default value for OpenSSH servers is 6.
Try connecting again after the changes have been made.