Date
May. 17th, 2024
 
2024年 4月 10日

Post: Raspberry Pi RealVNC can not be connected

Raspberry Pi RealVNC can not be connected

Published 15:05 May 01, 2024.

Created by @ezra. Categorized in #UNIX/Linux, and tagged as #UNIX/Linux.

Source format: Markdown

Table of Content

What's wrong

I just reinstalled the bookworm version of Raspberry OS for my 4B model. After enabled the VNC server, I can not connect to the Pi due to this error:

unknown authentication scheme from vnc server 13, 5

How to fix

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.x, 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:

GUI way

  • 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.

00

01

CLI way

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
Pinned Message
HOTODOGO
I'm looking for a SOFTWARE PROJECT DIRECTOR / SOFTWARE R&D DIRECTOR position in a fresh and dynamic company. I would like to gain the right experience and extend my skills while working in great teams and big projects.
Feel free to contact me.
For more information, please view online résumé or download PDF
本人正在寻求任职 软件项目经理 / 软件技术经理 岗位的机会, 希望加⼊某个新鲜⽽充满活⼒的公司。
如有意向请随时 与我联系
更多信息请 查阅在线简历下载 PDF