On the home / SERVER computer, go to and find your public ip. Remote connections from outside your local network (via the internet), you will need to reconfigure your Putty settings on the CLIENT computer to be the public IP of your home / SERVER internet connection.Go into both inbound and outbound rules and add a rule to allow connections to port 22 Click on the left pane (win7 users) on Advanced Settings.
Go to Control Panel > Security and System > Windows Firewall.
This in turn forces our remote desktop client to use the SSH tunnel we created at 40000 to connect to our remote pc at the 22 port. Enter in 127.0.0.1:40000 for the computer to connect to.ġ27.0.0.1 = the local tcp/ip stack loopback address and 40000 = port to connect over. On the laptop/client computer, open Remote Desktop Connection (Start Menu > All Programs > Accessories > Remote Desktop Connection)Ģ. Once you connect, the command window will change to a local window.Ĭonnecting via Remote Desktop over the SSH Tunnelġ. Enter your remote computers login username and password. We now should get a command window like interface asking for a user. You should get a prompt to accept a key the first time we connect, click Yes.ĥ. Go back to the Sessions section and click the Save button under the Saved Sessions box and then hit the Open button.Ĥ. Under the Connection > SSH > Tunnels tab, under Source Port, enter in a local port to connect to as our tunnel (i use a very high port in the 40000 range, we’ll use 40000), in the Destination box, we can put in the ip address of the remote computer we have running Copssh/SSH, 10.0.1.5 in my example. Also you can go under the Saved Session box and enter a name to save the profile as for easy connection (more later on this). Under the Session section (on left pane), type in the host name of the pc we are connecting to (in our example on our local network). To make it easier to launch, you can create a shortcut to Putty.exe and put it on your desktop or in your Start Menu.ģ. To run putty, we will just run the Putty.exe in the C:\Putty folder.
To install putty, just extract the Zip for to your C:\Putty folder. On the CLIENT computer we are connecting from, we will need to install Putty and configure it to connect RDP over SSH (ie create the tunnel).ġ. Installing Putty and Configuring our SSH Tunnel and Remote Desktop (Note: The user we activated will be used on the laptop / client computer in Putty)
We now should have an SSH service running and in turn connect remotely via our Tunnel (on port 22). Type a passphrase to create your RSA key (2048bit encrypted, very good encryption). Choose your user account in the drop down and click the Next buttonĤ. Once installed, you will want to go to Start Menu > All Programs > Copssh > 01. Download and install CopSSH on the SEVER computer.Ģ.
We’ll use Windows 7 as our operating system, however the steps will be nearly identical for Vista and XP.ġ. So the SERVER would be my desktop home pc and the CLIENT would be my laptop I take with when traveling. In this recipe, we will refer to the computer we want to connect to as the SERVER and the pc that we are connecting from as the CLIENT (traditional networking terms). Windows XP Prof, Vista Home Premium/Ultimate, Win7 Home Premium/Prof/Ultimate ( not all versions of XP, Vista, Win7 allow remote desktop connections).Copssh – OpenSSH / SSH (free, get here) Works w/32bit and 64bit Windows.This exact walk through will work on a local network, read the Notes section at the end for connecting remotely over the internet (more advanced). You will want to have at least basic to moderate knowledge of how Remote Desktop (RDP) works and also basic networking knowledge, the rest we will cover in the recipe. Remote desktop (aka Terminal Services in the corp landscape) by default is not necessarily the most service to have running on your Windows machine due to the number of exploits available that use the RDP port (port 3389) or you may have a business need to secure such a connection between two offices or sites.
This tech-recipe will explain how to securely remote desktop into a computer or server using Copssh / SSH and Putty (free, open source) to Remote Desktop.