VNC over ssh on OS X Tiger Server


Apple Remote Desktop 3 includes secure encrypted sessions for remote access. However, I use the free alternative - VNC over ssh tunnel. Here is how to get up and running.

Configuring the Server

On your OS X Server, download OSXvnc and drag to Applications folder.

Launch OSXvnc.

Here are the application tabs and the settings I used.
Notes: Display Name can be whatever you want.







Note the "Only allow local connections" below. That's because we use ssh port forwarding, so effective from the server's point of view, the connection to VNC server is coming from local ssh port 22.







Click Restart Server, or Start Server button in lower right hand corner of window. Leave the OSXvnc app running.

Ensure your ssh is on at System Preferences -> Sharing -> Remote Login -> ON

Connecting from another machine over ssh

Download Chicken of the VNC and drag to your apps folder if you have not already done so.

Before running our VNC client, let's establish our ssh tunnel between port 5901 on our client machine and port 5901 on the server running OSXvnc.

Open a terminal shell and type:
$ ssh user@hostname -L 5901/127.0.0.1/5901

in my case this command looked like:
$ ssh admin@server1.local -L 5901/127.0.0.1/5901

Enter your remote host password at the prompt and just leave that terminal shell running.

Now launch Chicken of the VNC.

Menu Connection -> New Connection...
We connect to port 5901 (display 1) on the local machine. You must use 127.0.0.1 .... bonjour names such as server.local do not work for this. Use the password you set up in OSXvnc on the server. This may be different to your user account password on that server.



And that's it. You should be in!



Resources
http://www.cl.cam.ac.uk/Research/DTG/attarchive/vnc/sshvnc.html
http://www.macmod.com/content/view/89//

Posted: Mon - September 18, 2006 at 10:18 PM        


Published by