Remote control one computer via another using ssh

Oct 25, '05 06:30:00AM

Contributed by: cpbaldwin

I have a Linux server (slowly being phased out by my OS X server) connected directly to the internet with a static IP address. Then I have an old PowerMac 9500 running OS 9.1 with Retrospect and a tape library to back up my Linux server. I like to be able to check the status of my backups remotely. This is how I did it.

First I installed VNC on the 9500 (OS9vnc Server v3.5.0) and set it up so that VNC runs as soon as it boots. It also auto-connects to the shares to be backed up. And it has a static IP address. Second, I installed VNCDimension on my PowerBook and created a session that connects to 127.0.0.1 and saved it. Here's how it looks:

 PowerBook --internet-> Linux Server --intranet-> 9500
Then I run this script on the PowerBook. I called it vnc9500 as this works with my other computers. All I need to do is copy the script, rename it and change the IP of the computer I want to remote control.

This script connects to my Linux server via ssh and does TCP forwarding to my 9500 (IP of 192.168.0.90) thru port 5900 for VNC. Then it opens the VNC session on 127.0.0.1, launching VNCDimension. Then it checks for a connection every minute. When I quit VNC, the script detects it and kills the ssh connection. This script should work with OS X in the middle instead of Linux with no problems.

[robg adds: Oct 25th update: I have fixed the link to the missing script. Sorry about that!]

Comments (5)


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