20

With the latest Dist-upgrade, it appears the VNC security settings have been changed which means I cannot access my Pi through VNC until they are changed back. I have SSH access.

As the Pi is over 100 miles away I would like to find a way of changing the security settings to enable me to connect with VNC again without having to be present. I remotely connect to a PC on the remote network and I have SSH access to the PI through that PC.

The error I get when trying to connect is "Error in TightVNC Viewer. No security types supported. Server sent security types, but we do not support any of them"

To make the answers to the question as useful as possible to anyone with a similar problem in the future I will phrase it as follows.

Using only SSH how can I ensure I have suitable VNC security settings?

4 Answers 4

29

To be able to use a non-compatible realvnc client you have to downgrade the security of the realvnc server to use vnc password authentication. To be able to to this without a desktop connection open a SSH session:

  1. Edit the config file in /root/.vnc/config.d/vncserver-x11
  2. Add the following lines at the end of the file

    Authentication=VncAuth
    Encryption=AlwaysOff
    Password=e0fd0472492935da
    
  3. Restart the server

This will set the authentication with the password: foobar. In order to change the password,

vncpasswd -service

Connection tested with TigerVNC 1.7.1

2
  • This saved me when using vncserver -flag didn't work from my terminal. Tested with TightVNC 2.8.27. Thanks!
    – GChuf
    Nov 10, 2020 at 10:29
  • I confirm this solution still works as of today using the latest RPiOS release named "bullseye"
    – Shodan
    Dec 8, 2021 at 8:37
5

Try using the realvnc viewer. There is some difference in the security settings between the two which produces that message.

2
  • I wanted to post - Thank you that worked although for other people with the same issue they may need to know that you will need to sign in with your username and password which you use to sign into your Pi not the password used to sign into tightVNC. I have upvoted but it will not show until I get 15 rep.
    – johnFX
    Mar 19, 2017 at 17:07
  • If anyone has the answer to the original question I would still like to know a way of restoring the security types (using SSH) to enable me to use the TightVNC viewer I have been using previously.
    – johnFX
    Mar 20, 2017 at 18:34
0

A solution to enable TightVNC viewer with this issue is to install and open VNC viewer in Chrome. From there you can access the Pi and its VNC server settings. Go to options, set authentication to "VNC password" and Encryption to "Prefer Off". See https://www.raspberrypi.org/forums/viewtopic.php?t=176408

After that I was again able to use TightVNC.

0

The following steps can be executed from an SSH session:

1. Edit the RealVNC server configuration file:

sudo vi /root/.vnc/config.d/vncserver-x11

2. Insert, edit, or replace the following lines:

Authentication=VncAuth

Encryption=AlwaysOff

3. Choose a VNC server authentication password (does not require sudo):

vncpasswd -print

4. Copy the ENTIRE "Password=...encrypted password..." line and PASTE or REPLACE it into the file:

/root/.vnc/config.d/vncserver-x11

5. RESTART the RealVNC server:

sudo systemctl restart vncserver-x11-serviced

You should now be able to establish a VNC session using TightVNC or any other viewer. Use the password chosen in step 3.

I know this solution is 2 years late, but I'm pissed that nobody else figured it out, because it only took me 4 hours.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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