Using the VNC Viewer on a Windows machine to access a Linux server sometimes encounters the "Connect:connection refused (10061)" error, which causes this error to occur in multiple reasons, as summarized below:
1: Forget to add the desktop number when using VNC viewer (usually IP: Desktop number, desktop number depends on your own configuration.) such as 10.20.34.76:2)
How to use the error:
How to use it correctly:
2: The vncserver service of the Linux server is not started.
If the Vncserver service is not started, a "connect:connection refused (10061)" error occurs when using VNC viewer access.
3: "Connect:connection refused (10061)" error occurs when a configuration issue causes VNC viewer access.
As shown below, a configuration file that configures VNC at a time, makes some modifications to the Copy Comment section, and then reports "Connect:connection refused (10061)" When Windows uses VNC viewer access. Check Vncserver services, firewalls, configuration files and so OK, has been a long time to find, in fact, because the configuration file part of the mistake, as shown below, use "-localhost" to prevent remote VNC clients Connecting except when doing so through a secure tunnel. See the "-via" option on the Man vncviewer ' manual page.
This parameter is actually forbidden to log on to the VNC server remotely using VNC client. The result is carelessly, oneself mercilessly put oneself toss a, oneself be oneself stupid cry.
Note : There is some information on the web, saying that firewall configuration issues will cause "Connect:connection refused (10061)", but in my tests and cases encountered, firewall issues will only cause "connect:connection Timed out (10060) ". Does not appear 10061 such errors, of course, also does not exclude is some environment, platform I did not test to.
VNC Connect:connection refused (10061)