Digital Marketing

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              127.0.0.1:3350                  *:*      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

Comments

Popular posts from this blog

MySQL Sandbox with the Sakila sample database