The following article assumes you already have VNC Server installed on your remote destination (i.e. a remote computer, VPS, or dedicated server).
Are you attempting to connect to a server or computer via VNC, but have come across the following error on your VNC Viewer?
What causes the above issue?
One of the primary causes for the above issue is that no response was received from VPS/dedicated server IP address.
Here are some basics steps every user can follow to troubleshoot/fix the above issue.
STEP #1: The first step is to ensure your VPS server is UP and online.
You can check it from your local system running below commands on your command prompt.
ping [IP Address]
Assuming you are not filtering ICMP packets, you should be able to receive a valid ICMP ping response back by pinging your server IP address.
STEP #2: Make sure the default port for VNC i.e 5900 is open on your firewall.
You can check from your local system running below command in your computer’s command prompt:
telnet [IP Address] 5900
If you can’t establish connection with the above command, either the port is closed in the server or the source IP address might be blocked on your server.
STEP #3: Open port 5900 with the following commands
sudo /sbin/iptables -I INPUT 1 -p TCP –dport 5900 -j ACCEPT
sudo iptables save
STEP #4: Finally you can try restarting VNC server on your server by typing the following command in your server’s SSH command line prompt:
sudo service vncserver restart