Well, I set mine up and it works fine. Your home machine (the one you want to tunnel to) needs to be set up with a fixed IP address and you need to port forward port 22 from the router to your port 22 on your home machine.
Next, you need to manually change your /etc/sshd_config file:
First thing I always do after an install of SSHD is edit a few items in the sshd_config file.
- At your terminal, 'su -' to your root account
- 'pico -w /etc/sshd_config'
- Look for the line containing "PermitRootLogin yes"
- Simply change this line to read "PermitRootLogin no" and be sure to remove the # from in from of the line.
- Next, find this line: #Protocol 2,1
- Remove the # at the beginning (it's a comment marker), and then remove the ,1 at the end. This will disable the SSH1 version of the SSH protocol -- it's my understanding that version one is less secure than version two (SSH2), so you might as well disable it (most newer operating systems will use SSH2 anyway).
- AllowUsers User1 User2 User3
The option AllowUsers specifies and controls which users can access ssh services. Multiple users can be specified, separated by spaces.
- Save your changes and exit the editor
- Open your "System Preferences", and choose "Sharing"
- If the check box beside Remote Access is not selected, turn it on if you wish for SSH access to be enabled. If it is already selected, then just cycle it. Click it off, then back on.
Now, for added security, I use OSXvnc.app for my VNC server. It has an option to "Allow Only Local Login" which means that the VNC will only work on LOCAL connections, which is what the SSH connect looks like remotely.
Now to attach to your home machine from work, you need to do two things. First, open Terminal and type ssh -L 5907:127.0.0.1:5901
userLogin@yourdydns.zapto.com. This command activates the SSH. the -L maps the local port on 5907 to the local machine on 5901 (so that your OSXvnc must be set to use port 5901). The userLogin is the UserID that you added to your sshd_config file. The rest is your dydns setting.
Finally, open Chicken of the VNC and the port address is 127.0.0.1 and the display is set to 7.
To manage your tunnels so you don't have to type all this all the time, I use SSH Tunnel Manager. It really isn't as hard as it sounds, especially once you get your home system properly configured.