LoginSignup
0
1

More than 1 year has passed since last update.

Linuxでリモートデスクトップのサーバを構築する

Posted at

古き良きvncや、sshのX11 forwardingなどを利用したLinuxサーバ上のGUIアプリケーションの利用方法があるが、ここではもう一歩踏み込んでグラフィカルログインまで利用できるxrdpのサービスを構築する。

 筆者環境

[eru@tndl ~]$ uname -a
Linux tndl.net 5.12.14-300.fc34.x86_64 #1 SMP Wed Jun 30 18:30:21 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
[eru@tndl ~]$ cat /etc/redhat-release 
Fedora release 34 (Thirty Four)

xrdpのサービス構築

  • xrdpのインストール
[eru@tndl ~]$ sudo dnf install -y xrdp
  • xrdpのサービス登録とスタート
# ディストリビューションのお作法によって異なります
[eru@tndl ~]$ sudo systemctl enable --now xrdp
  • (必要であれば1)ポート開放
# ディストリビューションによってはfirewalldでなかったり、rdp.xmlが用意されてないかもしれません
[eru@tndl ~]$ ls /usr/lib/firewalld/services/rdp.xml
ls /usr/lib/firewalld/services/rdp.xml
[eru@tndl ~]$ sudo firewall-cmd --permanent --add-service=rdp
[eru@tndl ~]$ sudo systemctl reload firewalld.service

最後に

ほぼ、ゼロコンフィグレーションでサービス構築できる良い世界だった。


  1. パスワード認証のみでは脆弱なので、外部からアクセスしたい場合にはsshポートフォワードやVPNを使うなどしたほうが良い 

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1