MobaXterm and Raspberry Pi: Unable to Connect to IPv6 VNC Host
Raspberry Pi is a popular single-board computer that can be used for a variety of purposes, from learning to code to building complex projects. One common use case is to run a VNC server on the Raspberry Pi and connect to it from another device, such as a laptop or desktop computer. However, some users have reported issues when trying to connect to a Raspberry Pi VNC server using MobaXterm over IPv6.
Understanding the Issue
When trying to connect to a Raspberry Pi VNC server using MobaXterm over IPv6, some users may encounter the following error:
Sorry, connection to VNC server failed.
This error occurs because MobaXterm does not support IPv6 addresses when connecting to a VNC server. This is a known issue and has been reported to the MobaXterm development team.
Possible Solutions
There are a few possible solutions to this issue:
Use a VPN or proxy server that supports IPv6 to connect to the Raspberry Pi VNC server. This will allow you to use an IPv4 address to connect to the VNC server, which MobaXterm does support.
Use a different VNC client that supports IPv6, such as TightVNC or RealVNC.
Use SSH tunneling to connect to the Raspberry Pi VNC server. This will allow you to use an IPv4 address to connect to the VNC server, even if the Raspberry Pi is configured to use IPv6.
Configuring SSH Tunneling
To configure SSH tunneling, follow these steps:
Open MobaXterm and create a new SSH session to the Raspberry Pi.
In the SSH session, run the following command to start the VNC server:
vncserver :1 -geometry 1024x768 -depth 24Make a note of the VNC server's IP address and port number. It will be displayed in the terminal window.
Open a new terminal window in MobaXterm and run the following command to create an SSH tunnel:
ssh -L 5901:localhost:5901 pi@In a web browser, navigate to http://localhost:5801 to access the VNC server.
While MobaXterm does not support IPv6 addresses when connecting to a VNC server, there are several possible solutions to this issue. By using a VPN or proxy server, a different VNC client, or SSH tunneling, users can connect to a Raspberry Pi VNC server over IPv4 and avoid the IPv6 connection error.