I can ssh into my machine. I want to be able to login to the GUI to do dev work. I went go Applications > System Tools > settings > Sharing > and I have Remote login and Screen Sharing both on. I tried to connect to the CentOS box from my Mac OSX box using VNC Viewer. For the server I used my internal IP: 192.x.x.x.

"The connection was refused by the host computer".

I am actively logged into the unix machine with a non-admin account.

How do I get going?

2 Answers 2


Well, asides from the obvious security holes that VNC causes (seriously, key stokes are sent unencrypted so anyone in the middle can grab a password), you're going to want to make sure that you have to adjust your firewall which is in:

Applications -> Firewall -> Enter your root password -> Services -> vnc-server

Enable it, quit, and make sure that vnc is started and enabled.

You can always check from your mac machine by using nmap against it.

  • 1
    Is there a more secure alternative for GUI access? (not ssh, I need GUI). Mar 1, 2015 at 0:54
  • As loshad mentioned you can use VNC through SSH but you'll need to do some funky things to get that workings. I'd just recommend using ssh -X user@host. If you need eclipse or firefox then you would just type eclipse from the command line and that GUI will be tunneled.
    – SailorCire
    Mar 1, 2015 at 1:01
  • 1
    X11 is the type of tool I was looking for. Mac: xquartz.macosforge.org/landing or Windows: mobaxterm.mobatek.net. Once you have X11 you can run a "remote desktop" like session through ssh. Mar 2, 2015 at 2:26
  • @P.Brian.Mackey I normally use cygwin, but anything that will emulate an X11 server will do
    – SailorCire
    Mar 2, 2015 at 12:55

Also you may log in to your machine using ssh -X -Y login@hostname (if allowed by sshd settings) and start vncviewer on a remote machine.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .