10.5: How to use screen sharing remotely and securely

Nov 19, '07 01:30:00PM

Contributed by: mschmidl

OS X 10.5's screen sharing feature works nicely on local networks. But to control your computer over an internet connection is easy, too.

  1. Use SSH to establish a tunnel to the computer you want to control. Be sure to use a local port other than 5900 -- otherwise the screen sharing app will complain about controlling the local screen is not possible. A good example is:
    ssh -L 1202/192.168.10.10/5900
    ...where 1202 is the local port, and 192.168.10.10:5900 the remote destination.
  2. Go into Safari and type in the URL vnc://localhost:1202, if you're using the local port 1202 as in the above example.
  3. Now drag the URL to your desktop to create a link to this URL
  4. Rename and/or change the icon for the URL link with the Get Info window.
If the tunnel is established and you click the generated link, the screen sharing app will start and show your remote computer.

[robg adds: A comment on the queue site notes "To ensure this is secure, you should ssh to the target host and forward to localhost. e.g: ssh -L 1202:localhost:5900."]

Comments (30)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20071106083653803