Setting up a Vine server for secure remote desktop access to your Mac

I connect to computers remotely on a daily basis. Most of what I do can be done on the command line, so I typically use SSH. However, sometimes it is nice to have a graphical interface. In the past, I’ve used X11 port forwarding to remotely access GUIs for individual Linux programs, and then later a VNC server to give remote access to the entire desktop environment. Recently, I was very excited to learn that the same thing can be accomplished on Mac OS X using Vine server. The setup and connection process is fairly simple.

  1. Download the Vine Server installer to your Mac, open it, and copy the program to your hard drive.
  2. Run the Vine server. This will set up a VNC server accessible through port 5900.
  3. At this point, you could use VNC Viewer to connect to your Mac remotely. However, this would be an unencrypted connection. For security reasons, connect to your Mac with SSH and tunnel the remote port 5900 to an unused local port–say, port 5909.
    ssh -L 5909:localhost:5900
  4. Once the encrypted SSH connection is established, you can connect to the remote desktop by pointing your VNC Viewer to localhost:5909. VNC Viewer will warn of an unencrypted connection, but this isn’t a problem since you are connecting to a port on your local machine, which is being fed by an encrypted connection to your remote Mac.

Voilá, you can now connect securely to your remote Mac’s desktop!

P.S. I’m assuming you are making an SSH connection to your Mac from a Linux/UNIX machine or from another Mac. If you are connecting to your Mac from a Windows machine via PuTTY, see these instructions for establishing the tunnel from the Mac’s port 5900 and your local port 5909.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s