How to RDP (Remote Desktop) into CentOS 7

Hi There,

In this tutorial I will show you how to RDP into your CentOS 7 Server. This tutorial will also work on a Redhat 7 server. In order to follow this tutorial you will need to be sure that you have CentOS 7 installed with the GNOME Desktop. If you haven’t done this yet be sure to follow this tutorial to get up to speed.

The first thing that we need to do is to add two repos to our CentOS server. The two commands that you need to run are:

  1. sudo rpm -Uvh
  2. sudo rpm -Uvh

Next we will install the xrdp software package and then start it as a service. The commands to do this are:

  1. sudo yum -y install xrdp tigervnc-server
  2. Sudo systemctl start xrdp.service

Now we need to allow the ports for xrdp through the firewall. After that we’ll need to restart the firewall service. This can be done by running these commands.

  1. sudo firewall-cmd –permanent –zone=public –add-port=3389/tcp
  2. sudo firewall-cmd –reload

Finally we need to configure SELinux. To do so run these two commands:

  1. sudo chcon –type=bin_t /usr/sbin/xrdp
  2. sudo chcon –type=bin_t /usr/sbin/xrdp-sesman

We can now try to RDP to our CentOS 7 server.

First open RDP and type in the IP address of you CentOS 7 Server.

If you get certificate warnings click yes to continue.

Now enter your CentOS username and password

You will now be brought to your CentOS Desktop.


 A full video of this tutorial can be seen here:

19 thoughts on “How to RDP (Remote Desktop) into CentOS 7

  1. Douglas Hodges

    Nice write up.
    The web editor’s auto-correct changed his commands.
    The commands that have flags with — are showing up as –.
    Update command:
    sudo firewall-cmd –permanent –zone=public –add-port=3389/tcp
    sudo firewall-cmd –reload
    sudo chcon –type=bin_t /usr/sbin/xrdp
    sudo chcon –type=bin_t /usr/sbin/xrdp-sesman

  2. Roy

    Hello, when i am trying to install xrdp tigervnc-server i get the following error. Any help please?

    Loaded plugins: fastestmirror, langpacks
    Loading mirror speeds from cached hostfile
    * base:
    * epel:
    * extras:
    * nux-dextop:
    * updates:
    Resolving Dependencies
    –> Running transaction check
    —> Package tigervnc-server.x86_64 0:1.8.0-5.el7 will be installed
    —> Package xrdp.x86_64 1:0.9.8-1.el7 will be installed
    –> Processing Dependency: xorgxrdp for package: 1:xrdp-0.9.8-1.el7.x86_64
    –> Running transaction check
    —> Package xorgxrdp.x86_64 0:0.2.8-3.el7 will be installed
    –> Processing Dependency: xorg-x11-server-Xorg(x86-64) = 1.20.1 for package: xorgxrdp-0.2.8-3.el7.x86_64
    –> Finished Dependency Resolution
    Error: Package: xorgxrdp-0.2.8-3.el7.x86_64 (epel)
    Requires: xorg-x11-server-Xorg(x86-64) = 1.20.1
    Installed: xorg-x11-server-Xorg-1.19.5-5.1.el7_5.0.1.x86_64 (@updates)
    xorg-x11-server-Xorg(x86-64) = 1.19.5-5.1.el7_5.0.1
    Available: xorg-x11-server-Xorg-1.19.5-5.el7.x86_64 (base)
    xorg-x11-server-Xorg(x86-64) = 1.19.5-5.el7
    Available: xorg-x11-server-Xorg-1.19.5-5.1.el7_5.x86_64 (updates)
    xorg-x11-server-Xorg(x86-64) = 1.19.5-5.1.el7_5
    You could try using –skip-broken to work around the problem
    You could try running: rpm -Va –nofiles –nodigest

    1. Riles

      Hey Roy,
      A mirror / package update is currently taking place. Some few mirrors already show xorg-x11-server-Xorg(x86-64) = 1.20.1
      I did this to get around it:
      yum install xrdp –enablerepo=cr

      for now as the xorg-x11-server-Xorg(x86-64) = 1.20.1 packages should be available in the continuous release repo.

  3. Rory

    I have done this and it worked brilliantly but then I reboot the machine it boots right up until I get to select user and then just black screens. The caps lock light is unresponsive but I can still ping the machine and webmin into it. So odd, I am an absolute novice when it comes to linux but willing to try. Would you have any idea what I am doing wrong? I have rebuilt the machine twice now. I changed the graphics card on the last build to a nvidea K2000 with not luck. Thank you in advance for any help.

  4. Pingback: How To RDP into CentOS 7 from Windows | Host your Website

  5. Pingback: How To RDP into CentOS 7 from Windows – My blog

  6. nize

    this works until the remote centos 7 gnome desktop is displayed and then RDP automatically closes the window/disconnects. any idea how to fix this? thanks.

      1. Dasith Ranasinghe

        Edit the xrdp.ini file located at the /etc/xrdp/xrdp.ini.
        Comment out the line that says “Channel_code=1”.

  7. Pingback: How To RDP into CentOS 7 from Windows | All about hosting

  8. Pingback: How To RDP into CentOS 7 from Windows > BENISNOUS

  9. Pingback: How To RDP into CentOS 7 from Windows - VPS and VPN

  10. Pingback: How To RDP into CentOS 7 from Windows - Hosting solutions

Leave a Reply

Your email address will not be published. Required fields are marked *