
There is one more step you can take here that's really pretty cool.įirst add the -g option to your tunnel, which allows anyone on your local LAN to access the remote computer via yours. The command line equivalent of all this is, which is listed in the options panel: ssh -N -p 22 -g -c 3des 'remote user -L 10548/localhost/548 I then connect to server localhost:10548 from the finder, and my remote afp volumes show up.
DOUBLE SSH TUNNEL MANAGER DOWNLOAD PASSWORD
Now all I have to do is start SSH Tunnel Manager, and I am prompted with my password for the remote machine. Auto connect, Handle authentication, allow LAN connection, Crypt method: 3des Because afp is blocked outside of the lan, I set this up as my solution. This machine has a large external fw drive with all of my iTunes music, and I wanted to be able to use that on my wifi network at home. I recently created a tunnel to provide afp access to my office server that sits behind a firewall. SSH Tunnel Manager v 2.0, a small application that handles ssh tunnels, may be of use for you. The reverse connection doesn't have to be to the login that you are using to connect to the remote machine any valid login on the local machine will do. Enter the information in the connection dialog and voila, you have access to the remote machine - even behind the incoming firewall. With CotVNC, the setup is to connect to localhost, display 0, with the bogus password. If you don't have an authorized SSH key on the CotVNC machine, then the Terminal window that opens for the AppleScript user on the remote machine will prompt for a password.

When the remote user runs this script, the tunnel is available on port 5900 on the localhost for the local VNC client. But since the remote machine is behind an incoming firewall that blocks port 22, we need to do a reverse tunnel to our localhost. The trick is that we want to tunnel from our local loopback address 127.0.0.1 (IPv4) on the machine running CotVNC to the remote machine. The other settings are not used unless you are using Apple's Remote Desktop software. Then, from the "Access Privileges." button, check "VNC viewers may control screen with password," enter a bogus password (since we are using SSH for security), and click OK. The only setting you need with Apple's 2.1 client (which should be called ARD 2.1 Server, but that would confuse the unwashed masses) is to check the Apple Remote Desktop in System Preferences Sharing Pane. Substitute the appropriate USER and DOMAIN.ORG information for your machine in the script. (* DOMAIN.ORG is the host name or IP address for the CotVNC machine *)ĭo script "ssh -R 5900:127.0.0.1:5900" in x (* USER is a user name on the CotVNC machine *)

Then I used a VNC application - I use Chicken of the VNC (CotVNC) pointing at localhost, display 0, to remotely control her iMac: The AppleScript does a reverse port mapping from her machine to mine. The following shell script is something that I probably couldn't have gotten across to her over the phone, but a simple AppleScript. you must have SSH enabled ("Remote Login" in Sharing preferences), and port 22 available through your firewall.

