jawj / IKEv2-setup

Set up Ubuntu Server 20.04 (or 18.04) as an IKEv2 VPN server
1.35k stars 338 forks source link

Received disconnect from x.x.x.x port 22:2: Too many authentication failures #146

Closed const-tmp closed 2 years ago

const-tmp commented 2 years ago

Server: Ubuntu 22.04 No ssh keys (password login) Local machine: MacOS 12.3.1

After setting up script and trying to login with ssh vpnuser@domain got the error: Received disconnect from x.x.x.x port 22:2: Too many authentication failures

First, I fixed it using ssh -o PubkeyAuthentication=no vpnuser@domain command.

After some research I found out, that problem is in MaxAuthTries 2 option in /etc/ssh/sshd_config. Setting it to 3 or more solves the problem, so you can login as usual by ssh vpnuser@domain.