6

The Problem:

I have a Raspberry Pi I connect using the VNC client Remmina from Ubuntu 22.04. Recently the realvnc-vnc-server was updated in the Raspberry Pi. Since the update the connection from Remmina to the Pi fails with the following error:

unknown authentication scheme from vnc server 13, 5

Debug log shows:

VNC returned: VNC server supports protocol version 5.0 (viewer 3.8)

After the update the realvnc-vnc-server version is 7.0.1.49073. I didn't find any older version of the vnc-server in the repository:

$ apt list realvnc* -a
Listing... Done
realvnc-vnc-server/stable,now 7.0.1.49073 armhf [installed]
realvnc-vnc-viewer/stable,now 7.0.1.48981 armhf [installed]

How do I go back to the older version of the vnc-server?

Previous Solutions

Note, the connection was working prior to the realvnc-vnc-server update. That is, the previous solution of the option Authentication=VncAuth is already set in /root/.vnc/config.d/vncserver-x11.

Thanks

1 Answer 1

9

I'd recommend using RealVNC's VNC Viewer - it's free to use and guaranteed to work with the RealVNC VNC Server. You can download it here: https://www.realvnc.com/en/connect/download/viewer/

However, after doing a bit of digging, what has probably happened here is that in VNC Server 6.11.0, RealVNC upgraded the security of how VNC passwords were stored: https://help.realvnc.com/hc/en-us/articles/6661259023389

Since the Raspberry Pi repository had version 6.10.0 previously and has now jumped to 7.0.1, this change is only just kicking in.

To add to the above, version 7.0.0 also changed the default encryption level of connections on Raspberry Pi from PreferOn to AlwaysOn, to match the default for VNC Server on other platforms.

This means that after installing 7.x VNC Server and restarting it, the password is upgraded to the new format, stopping connectivity from non-RealVNC VNC Viewers.

To correct this, you will need to change VNC Server's Encryption from AlwaysOn to the previous PreferOn (though if you aren't using a RealVNC VNC Viewer you won't benefit from any encryption anyway), and then reset your VNC Password. Theres' 2 ways to do this:

  1. Using the GUI. Open VNC Server's Options, and change the Encryption dropdown to Prefer On or Prefer Off, and click Apply.

    Next, go to Users & Permissions and click the Password button on the right. Enter your password and make sure to check the "Allow connections from legacy VNC Viewers" checkbox.

    legacy VNC Viewer checkbox

2. Using SSH/command line. Run the below commands:

echo 'Encryption=PreferOn' | sudo tee -a /root/.vnc/config.d/vncserver-x11

sudo vncpasswd -legacy -service

sudo systemctl restart vncserver-x11-serviced
3
  • I used the GUI method and it worked. I kept the Encryption to Prefer On and reset the password checking the box for connection from legacy VNC viewer user. Thanks!
    – user68186
    Mar 30, 2023 at 13:56
  • For those updating from an old Bullseye to a new one, then the "sudo vncpasswd -legacy -service" is vital, otherwise it will not connect with Remina clients. It should be on by default imho.
    – PeterS
    May 1, 2023 at 15:33
  • Note that RealVNC is a proprietary software. Maybe better to try native software like gvncviewer or xtightvncviewer or similar ones Jan 9 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.