Monday, June 15, 2015

How to make a remote desktop connection on Linux and Windows

Here we are going to talk about how to make remote desktop connections in Linux and Windows OSs. I think you know how to establish a RDP connection to windows machine from another windows machine. So firstly i will talk about how to establish a RDP connection to a Windows machine from Linux machine.

Note : This demonstration is for Ubuntu and Kali like linux machines

RDP from Windows to Linux
  
Get the terminal. And type apt-get install xrdp

It will install the XRDP on your linux system. Then type service start xrdp
This will start the XRDP service on your linux machine.

Now in the terminal type whoami. This will show you the host name of your linux. Remember it. And type ifconfig find your ip address and keep in mind.
Go to your Windows machine and get run and type mstsc. Type your linux machine's IP and click on connect. Then a windows will come with black background popup for input username and password. Make sure in front of the Module has selected the Sesman-Xvnc. On the Username field type the Hostname of your linux. On the password type it's password (login password for your linux). Click on OK. Then RDP connection to the linux machine will come.

RDP from Linux to Windows


Install XRDP in Linux machine as above. Get the terminal and type rdesktop and enter. If it say rdesktop has to be install type apt-get intall rdesktop. Then type rdesktop [IP address] . In the [IP address] type your windows machine's IP addres and enter. Then in a new windows it will open up the remote desktop connection to the windows machine. Some times you may get an error of "Failed to connect , CredSSP required by server". For this go to your windows machine and got remote connection properties (Right click Comuter > Properties > Remote Settings >)  Under the Allow Remote connection to this computer remove the tick for Allow connections only from computers running Remote Desktop with Network Level Authentication(recomended). Its for Windows 8. In Windows 7 go to Remote connection settings and select the middle one which is Allow connections from computers running any version of Remote Desktop (less secure). Then connect again from your linux machine.

You can give any resolution for the RDP windows like this. Lets say you want 1320x1020 resolution for the RDP connection... type

rdesktop [IP Address] -g 1320x120

RDP with linux two linux machine also can be done in same manner. Type rdesktop [IP Address] in the other linux machine. You can get the Remote desktop connection.

No comments:

Post a Comment