There are some scenarios where linux admins need to connect to windows servers with rdp from linux console or GUI. Whenever we do the minimal installation of CentOS 7 or RHEL 7 we do not have any tools to RDP windows machine. So we have to manually install ‘freerdp’ package which will allows us to take remote desktop of windows server from console or terminal.
‘freerdp’ package is available in the default CentOS 7 and RHEL 7 repositories. In Case you have installed your CentOS 7 or RHEL 7 with Desktop Environments like GNOME or KDE then ‘freerdp’ package will be installed automatically.
Install freerdp on CentOS 7 / RHEL 7
Let’s first install Desktop environment related packages using the beneath yum command. If we don’t install these packages then xfreerdp command will not work from command line
[root@dkengine2 ~]# yum install "@X Window System" xorg-x11-xauth xorg-x11-fonts-* xorg-x11-utils –y [root@dkengine2 ~]# yum install freerdp -y
Once the freerdp is installed successfully then we have ‘xfreerdp’ command through we can connect to windows machine. Disconnect ssh session of your server and connect it again with ‘-X’ option. Example is shown below
‘ssh root@{your-server-ip} -X‘
Connect to Windows Machine with RDP from CentOS 7 / RHEL 7 Console or terminal
Run the below ‘xfreerdp’ command, replace the user name and ip address and screen resolution as per your setup.
[root@dkengine2 ~]# xfreerdp -g 800x600 -u administrator 192.168.0.151
Note: Before taking RDP, please make sure remote desktop option is enabled in windows server
That’s all from this article, If you like above steps, please don’t hesitate to share with your technical friends