A colleague of mine recently showed me how to get Windows Remote Desktop working over an SSH tunnel. The instructions below assume that you have a target machine set up to accept remote desktop connections and a working SSH tunnel such as stunnel.
- On the client Windows XP machine, copy
WINDOWS\system32directory to a new directory (like
- Right-click the new copy of mstc.exe and chose Properties from the context menu. Click the Compatibility tab and check the Compatibility mode checkbox. Choose Windows 98/Windows Me from the Compatibility mode dropdown.
- Add port 3389 to your SSH tunnel, mapped to the remote desktop host on the destination side. (Re)start your SSH tunnel.
c:\rdp-ssh\mstsc.exeand enter localhost as the hostname.
Windows requires the compatibility-mode change because the remote desktop client normally objects to connecting to localhost, thinking that there’s already a desktop session there.