VNC connect: Connection refused (10061), vnc10061
When you use VNC Viewer on a Windows server to access a Linux server, you may encounter the "connect: Connection refused (10061)" error. The cause of this error is as follows:
1: when using the VNC Viewer, you forget to add the desktop number (generally IP: desktop number. The desktop number depends on your own configuration. For example, 10.20.34.76: 2)
Incorrect usage:
Correct usage:
2: The Linux server's vncserver service is not started.
If the vncserver service is not started, the "connect: Connection refused (10061)" error will occur when you access it using the VNC Viewer.
3: "connect: Connection refused (10061)" error occurs when the VNC Viewer is accessed due to configuration problems.
As shown in the following figure, the configuration file for one VNC configuration is modified in the remarks part of the Copy operation. When you use VNC Viewer in Windows, the "connect: Connection refused (10061)" message is always reported) ", check the vncserver service, firewall, configuration files, etc. are OK, it has been a long time to find out, in fact, because the configuration file is wrong, as shown below, use "-localhost" to prevent remote VNC clients connecting using t when doing so through a secure tunnel. see the "-via" option in the man vncviewer 'Manual page.
This parameter prohibits Remote use of the VNC Client to log on to the VNC server. As a result, I accidentally threw myself up and cried myself.
Note:: There is some information on the Internet, saying that firewall configuration problems will lead to "connect: Connection refused (10061)", but in my tests and cases, firewall problems will only lead to "connect: connection timed out (10060 )". the error 10061 does not occur. Of course, some environments and platforms are not tested.