How to Solve ‘Too many authentication failures for root user’ SSH Error? Print

  • 0

This article is composed in reference to the root user.
So, you will need to replace the username, which resulted in "too many authentication failures for 'username.'"

Firstly, we need to understand the cause of the error.
Generally, when you have exceeded the number of failed login attempts limit, the OpenSSH/ Putty (or any other remote SSH connection tool) restricts you from logging in.

Please go through the below-provided steps to solve this issue – 

1. The screen capture below demonstrates the exceeded failed login attempt limit.

2. Now, you can use any other device to log in to your VPS through any alternate user created previously.

NOTE: If you have purchased a Linux VPS with Accuweb Hosting, you can contact us through a ticket or email us at regarding this issue.

3. Once you log in to your VPS, you will need to execute the below-mentioned command to reach the sshd_config file.
We will enter the sshd_config file to modify the maximum number of tries allowed in a single session.

# vi /etc/ssh/sshd_config or (sudo vi /etc/ssh/sshd_config)

4. You will see the 'MaxAuthTries 6' as shown in the image below. 
Click 'I' to enter the editing mode in the file.

  • After modifying MaxAuthTries to 10, you can click on Esc and type :wq to save and exit the file.
    After modifying the file, it will look as shown in this screen capture –

  • Do not forget to run the service sshd restart command or sudo service sshd restart to apply changes made in the file.

5. You can try to log in with the previously inaccessible user or the user, which resulted in "too many authentication failures for 'username.'"


Was this answer helpful?

« Back