Chomping at the bit

mako132 on 2003-08-09T22:47:49

I have all these ideas for testing, but I can't access the machines from home - they're all behind the firewall, and we can't get VPN working for us Mac OS X folks. I'll probably end up ssh-tunnelling for my Unix systems, but I need to figure out a way of getting Windows Terminal Services work through an ssh tunnel.


SSH Port Forwarding to the rescue (maybe)

Dom2 on 2003-08-10T09:25:35

If windows terminal service uses TCP connections from client to server in the usual manner, then you can probably get away with using ssh port forwarding. Assuming (I don't know it should be) that terminal services lives on port 9876, the command would be:
ssh -L 9876:windowshost:9876 unixhost

Then, you just point your terminal services client at localhost:9876 and it should "just work" whilst the ssh connection is up.

Note that if you want to connect to the machine doing the port forwarding from somewhere other than "localhost", you'll have to add a -g flag.

If the terminal services server makes a connection back to the client, you'll have to fiddle around with the -R option, but that's pretty unlikely.

If TS uses UDP, then you're outta luck. Sorry. (unless anybody else knows how to forward udp over ssh?)

I use this technique to gain access to work's HTTP proxy, so I can view all the internal sites from home. Works like a champ!

-Dom

It works

jhorwitz on 2003-08-10T14:36:16

You're in luck -- terminal services uses TCP port 3389. I use SSH to tunnel it all the time. However, the remote desktop client shipped with XP doesn't want to connect to localhost (at least on my machines), so use the Win2K version if you're on XP and you have access to it.