Advertisements

Received disconnect from host: 2: Too many authentication failures for username

root@linux:~ # ssh emerson@10.32.36.45
Received disconnect from 10.32.36.45: 2: Too many authentication failures for emerson

The problem was that my server 10.32.36.45 tried to authenticate using a method and then gave up.

To fix it, edit file /etc/ssh/sshd_config and increase MaxAuthTries. On my server was just trying 1 time.

root@linux:~ # vi /etc/ssh/sshd_config
#MaxAuthTries 1

You can try to not use ssh keys to login but I commented the parameter to restore the default value and restarted the sshd service

root@linux:~ # service sshd restart
Stopping sshd: [ OK ]
Starting sshd: [ OK ]

Advertisements
%d bloggers like this: