Skip to main content

How to Install xrdp on CentOS 7 / RHEL 7

$ sudo yum -y install xrdp
$ sudo systemctl start xrdp
$ sudo systemctl status xrdp
xrdp.service - LSB: Starts the xrdp daemon
   Loaded: loaded (/etc/rc.d/init.d/xrdp)
   Active: active (running) since Sat 2015-03-07 22:49:16 EST; 26s ago
  Process: 22272 ExecStart=/etc/rc.d/init.d/xrdp start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/xrdp.service
           ââ22281 /usr/sbin/xrdp
           ââ22285 /usr/sbin/xrdp-sesman

Mar 07 22:49:16 localhost.localdomain xrdp[22272]: Starting xrdp: [  OK  ]
Mar 07 22:49:16 localhost.localdomain xrdp[22272]: Starting xrdp-sesman: [  O...
Mar 07 22:49:16 localhost.localdomain systemd[1]: Started LSB: Starts the xrd...
Hint: Some lines were ellipsized, use -l to show in full.
$ sudo ss -antup | grep xrdp
tcp    LISTEN     0      2                      *:3389                  *:*      users:(("xrdp",22281,6))

tcp    LISTEN     0      2                      *:*      users:(("xrdp-sesman",22285,6))

By default, services wont auto start after system reboot. Issue the following command to enable the service at system start up.

$ sudo systemctl enable xrdp.service
Next is to create iptables rule to allow rdp connection from the external machines, following command will add the exception for rdp port (3389).

$ sudo firewall-cmd --permanent --zone=public --add-port=3389/tcp
$ sudo firewall-cmd --reload

Now you can connect from for example Windows machine using "Remote Desktop Connection".

If you would like to fine tune your parameters, edit the file of /etc/xrdp/xrdp.ini and restart xrdp service. Inside /etc/xrdp/xrdp.ini, you can find section [xrdp1], [xrdp2], [xrdp3]...., you can choose to login with different section. You can port=-1 so it will connect to the last session. You can change username default to "i88ca" instead of "ask". Or you can set the username to "aski88ca", which will ask you for username while preset it to i88ca.

See also

Encryption levels of Remote Desktop connections

How to install RHEL EPEL Repo in Centos

Post a Comment

Popular posts from this blog

How to reset password of Jenkins

Reset password of JenkinsPrefer way, No securities were harmedSee also:
What is Jenkins' initial admin password

To reset it without disabling security if you're using matrix permissions (probably easily adaptable to other login methods): In config.xml, set disableSignup to false.Restart Jenkins.Go to the Jenkins web page and sign up with a new user.In config.xml, duplicate one of the <permission>hudson.model.Hudson.Administer:username</permission> lines and replace username with the new user.If it's a private server, set disableSignup back to true in config.xml.Restart Jenkins.Go to the Jenkins web page and log in as the new user.Reset the password of the original user.Log in as the original user. Optional cleanup: Delete the new user.Delete the temporary <permission> line in config.xml. Alternative way:
ssh to the server, disable authentication, set the password via the Jenkins Web UI, then enable authentication.