1.5. 连接到多个用户的无头服务器上的远程桌面会话


GNOME 远程桌面可以与 GNOME 显示管理器(GDM)集成,以通过 RDP 为多个用户提供远程登录功能。远程用户使用系统范围的密码进行身份验证,它会授予对图形登录屏幕的访问权限。用户可以使用单独的凭据登录,从而启用对桌面环境的安全远程访问。

通过 RDP 连接到远程桌面,需要设置 TLS 密钥和 TLS 证书。

先决条件

流程

  1. gnome-remote-desktop 用户身份为自签名 TLS 证书创建一个目录:

    $ sudo -u gnome-remote-desktop mkdir -p ~gnome-remote-desktop/.local/share/gnome-remote-desktop
    Copy to Clipboard Toggle word wrap
  2. gnome-remote-desktop 用户身份为 RDP 服务生成自签名 TLS 证书:

    $ sudo -u gnome-remote-desktop winpr-makecert -silent -rdp -path ~gnome-remote-desktop/.local/share/gnome-remote-desktop tls
    Copy to Clipboard Toggle word wrap
  3. 通过 RDP 连接到远程桌面,为多个用户连接到远程桌面:

    $ grdctl --system rdp set-tls-key ~gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.key
    $ grdctl --system rdp set-tls-cert ~gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.crt
    $ grdctl --system rdp set-credentials
    $ grdctl --system rdp enable
    Copy to Clipboard Toggle word wrap

    如需更多信息,请参阅 gdrctl 手册页。

  4. 启用系统远程登录服务和 GDM :

    $ sudo systemctl enable --now gdm
    $ sudo systemctl enable --now gnome-remote-desktop.service
    Copy to Clipboard Toggle word wrap
  5. 使 gnome-remote-desktop.service 在系统重启后持久保留:

    $ sudo systemctl set-default graphical.target
    Copy to Clipboard Toggle word wrap

验证

  • 验证会话是否已成功启动:

    $ sudo systemctl status gnome-remote-desktop.service
    Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat