RDP over SSH or Connect to Terminal Server (RDP) via secure connection

Situation, we want to connect through the RDP protocol to a server that is on the other side of the Internet, I make a case study. We imagine that I am at home with a normal PC and a normal MODEM/ADSL connection, I want to connect to a server of my company. My company's public IP is the 212.011.234.068, and I have for example 4 RDP servers within the network (the 192.168.0.101, 102, 103 and 104), the first thing is the FW of the company map the port 22 (SSH) to the SSH server, which in my case study will be the 192.168.0.101. Then simply from the PC we will open an SSH connection to the FW, it will redirect me to SERVIDOR01 and once logged in via SSH, I minimize the putty screen (SSH Client) and from my own PC I can open the Windows RDP client and connect to the server I want.

The first thing is to install the SSH server on the 192.168.0.101, To do this, we follow the steps of this procedure – HERE. That more or less knowing is summarized in the following screen:

First the SSH server is installed on the 192.168.0.101 and once the installation is complete, these commands are made to give LOGON permissions to a user via SSH and start the SSH service. Don't forget on the FW or Router to map the port 22 To this IP. And with this alone, the server part is finished, they are simply now a few tweaks on the customer's side.

To connect we will use the SSH client called Putty (HERE), it's simply an executable, We open it and modify these parameters: In the part of “Tunnels”, We can create port forwards, for example when we connect to the port 8101 we will go to the RDP of 192.168.0.101, when we connect to the 8102 we will go to the RDP of 192.168.0.102, to the 8103 We'll go to 192.168.0.103… and so on as many as we want, We invented the port of origin.

In the part of “SSH”, We enable compression by clicking “Enable compression” and select that we will only connect with the version 2 by clicking on “2 only”.

And now up top we'll record the Session so we don't have to set all this up whenever we want to connect. We put the Public IP address of our company to which we will connect to its port 22 and will send us in, We put the parameters as in the picture, We give it to save “Save” and we can now open the connection to test it with “Open”.

The first time we connect this alert will come out, Indicate “Yes”.

Ok, we enter the username and password with which we will log in to the SSH which will be the one we have previously given permissions through the SSH server commands, Once connected, WE DO NOT CLOSE THE WINDOW, We left it MINIMIZED.

We open the RDP client > “Beginning” > “Programmes” > “Accessories” > “Communications” > “Remote Desktop Connection” and we put to connect ALWAYS localhost followed by port to which we will connect, Before, in the tunnels we created three ports, the 8101, 8102 and the 8103, Each port will take us to a different server. We set the example: “localhost:8101” and we give “Connect”.

And we see that it opens up the connection for us, Now all that remains is… work!!

And always important to leave the putty window minimized, and once we finish with RDP then we close it, and in this way we will always access the Terminal Server securely, Encrypting Network Traffic.


Recommended Posts

Author

nheobug@bujarra.com
Autor del blog Bujarra.com Cualquier necesidad que tengas, Do not hesitate to contact me, I will try to help you whenever I can, Sharing is living ;) . Enjoy documents!!!