Mar 15 2009

Connect to Windows using Remote Desktop via SSH

For those who have Linux and Windows machines on the same network, you can access your remote desktop enabled Windows machines through your Linux machine via SSH. Instead of opening ports and and forwarding ports to each Windows machine which would require changing default remote desktop ports, you can just open and forward the SSH port to your Linux machine. All that is needed is to configure your router to forward SSH to your Linux box, enable remote desktop on your Windows machines, and a great free program called PuTTY.

Step 1 – Download PuTTY. The download page offers various different software, but you only need PuTTY. There is no installation required. The whole program is contained in a single exe file.

Step 2 – Configure your Windows machines and accounts in your Windows machines to enable remote desktop.

ssh-step-1

Step 3 – Open PuTTY and enter the host or IP of your network. If you have a dynamic IP address, make sure you sign up for a dynamic IP address service such as afraid.org or DynDNS. The connection type of SSH and port 22 should already be selected.

ssh-step-3

Step 4 – Expand the SSH menu and click on Tunnels. Enter 3389 in the Source textbox. Enter the IP address on your network of your Windows machine in the Destination textbox. In the example image, 192.168.1.102:3389 is used. Click on Add.

ssh-step-2

Step 5 – Click Open. A console window should open asking for your username and password. Log in as you would normally with your username and password.

ssh-step-4

Step 6 – Open Remote Desktop Connection and on the Computer textbox, enter localhost:3389.

ssh-step-5

Step 7 – You will be prompted for your username and password. Log in as you would normally on your Windows machine.

Yes I know I shouldn’t be showing my real network names and hosts.

This method can be used to connect to pretty much any service on your network via SSH without opening any additional ports aside from SSH. Go nuts.