Remote Desktop 2: How to use ssh tunneling to control a VNC Server

Learn how to use Remote Desktop 2 to control a VNC Server via an ssh tunnel.

Note: If you don't have the AppleVNCServer running on your machine, you can forward port 5900 and skip step 4.

  1. Open an ssh connection to a remote computer to port forward the port:

    ssh -L 5910:remoteserver.apple.com:5900 -f -N user@remoteserver.apple.com
  2. Enter the password as you would in a typical ssh connection.
  3. Open Remote Desktop and add 127.0.0.1 to the list with the name and password of the remote machine. Add to the list without verifying the password.
  4. Get Info on the computer you added and click the Edit button.
  5. Add the port number from step 1 (in this example, 5910). Be sure to add a colon between the IP Address and the port number, such as "127.0.0.1:5910".
  6. Click Done. When you control or observe the "127.0.0.1" machine, you will be accessing the remote computer.

Note: Remote Desktop 3 introduces an option to encrypt all network data, which uses an ssh tunnel when controlling or observing.

Published Date: Feb 20, 2012