Too many authentication failures VNC server

10,682

Solution 1

There is a solution without restarting vncserver:

Connect by SSH, and type in the command to change the VNC password vncpasswd.

After changing password, authentication failures will reset and you'll be able to login again. In this case your VNC desktop will remain launched without interrupting.

Solution 2

Let me explain this in a technical manner. This happens when too many authentication attempts fail. You might not realize this because your authentication passes well. This happens because, various bots and users try to hack into your VNC port or any other open port (Mostly SSH), and cause this error to appear. The server decides not to allow any more requests to enter because there could be a potential vulnerability.

Open /var/log/auth.log file and you will see how many users have tried to enter your VNC server or any other port. (View this article for more info)

Do the following steps...

Step 1: Check the running VNC servers, kill them and restart

$ pgrep vnc

4456
45890

$ kill 4456
$ kill 45890

$ vncserver
// your vnc server will start

Now try connecting, and if this still fails, restart the server.

Step 2: Block the 5901 port (VNS Port), when not in use

This can be blocked by firewall rules or security groups of a Cloud Service provider. If you are using a different kind of server, contact the Network Admin to disable this port when not in use.

Share:
10,682

Related videos on Youtube

Ignacio Pozo
Author by

Ignacio Pozo

Updated on September 18, 2022

Comments

  • Ignacio Pozo
    Ignacio Pozo over 1 year

    It's has been some time since I am using vncserver to connect to my remote server, and since some weeks ago I am getting the Too many authentication failures error.

    The RealVNC solution is to wait some time, but it does not really work. The other thing is to restart the vncserver but that would cause to lose some windows that are important… So I wanted to ask if there is another solution.

    The other fixes that I found only applies to Too many security failures, or ssh authentication failures.

    I am using Xfce and Ubuntu 16.04.

    Edit: the best is to use x2go

    • Admin
      Admin over 6 years
      No, there is no other solution than restarting the service and/or the remote machine.
  • mmccoo
    mmccoo about 3 years
    Thank you. Browsing through my auth.log was a nice reminder to turn off passwordless login and to enable ufw (after enabling 22)