Centos 8 XRDP 設置紀錄

設定方法

  1. 新增 EPEL repository

    • 方法1
      yum install -y epel-release
    • 方法2
      latest 後的數字是 centos 版號

      rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

      2.安裝 xrdp、tigervnc-server

      yum -y install xrdp tigervnc-server
  2. 服務設定

    systemctl start  xrdp
    systemctl enable xrdp
  3. firewall 設定

    firewall-cmd --permanent --add-port=3389/tcp
    firewall-cmd --reload

沒有設定 SELinux 可能會導致密碼驗證不會過
這邊的密碼並不是另外安裝 tightVNC 來設定的 vncpasswd、而是ubuntu 登入的本機帳號密碼
可以參考這篇
https://footmark.com.tw/news/linux/centos/centos7-xrdp/

如果連線時發生 xrdp 無法連線到 xrdp-sesman
[ERROR] xrdp_wm_log_msg: Error connecting to sesman on 127.0.0.1:3350
可以先檢查是否有啟用 ipv6
此類服務如果有 ipv6 跟 ipv4 都開啟的時候有時候會發生不回應 ipv4 的狀態,把網卡上的 ipv6 disable 掉就可以迴避這個問題

  1. SELinux
    chcon --type=bin_t /usr/sbin/xrdp
    chcon --type=bin_t /usr/sbin/xrdp-sesman

參考資料

https://cloudnodelab.azurewebsites.net/how-to-install-xrdp-on-centos-7-9/

關於

登山嚮導 / IT / 武術/網頁工程 - 貪多而正努力咀嚼的人生小吃貨