Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a root access to VPS (centos 6). I have installed VNCServer using this guide line

Everything goes perfectly and server is running via termina. Now I am trying to connect to that server via vncviewer (mac os). but its giving me error

Connection refused (61)

I am providing only the IP address of the VPS, maybe I also needed port address? How to configure port on vncserver? or its something else?

share|improve this question

I've just had this problem. I resolved it by explicitly stating the port number when connectin from the client. E.g.:

Hope this helps someone.

share|improve this answer

First, temporary disable iptables using this command:

service iptables stop

Now try to connect; if the connection was successful, then try to allow VNC default port in iptables.

share|improve this answer

To get this working I installed the VNC server, then added the following to the firewall:

iptables -I INPUT -p tcp --dport 5900 -j ACCEPT
iptables -I INPUT -p tcp --dport 5901 -j ACCEPT

Then in my VNC client I connected by including the port number in the IP.

There's no need to stop IPTABLES.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.