网站首页 > 博客文章 正文
本文主要描述如何通过 JumpServer 访问 Linux(CentOS)的图形化界面。本次示例以 CentOS7.6 为例。
一、概述
本文主要描述如何通过 JumpServer 访问 Linux(CentOS)的图形化界面。本次示例以 CentOS7.6 为例。
二、Linux 资产的配置
1、安装桌面环境
安装桌面环境 GNOME
yum -y groups install "GNOME Desktop"
从命令行切换到桌面环境
startx
重新开启一个新的连接页面
获取当前启动模式
systemctl get-default
修改启动模式为图形化
systemctl set-default graphical.target
修改启动模式为命令行
systemctl set-default multi-user.target
修改配置文件
vi /etc/gdm/custom.conf
增加如下配置
[daemon]
AutomaticLoginEnable=True
AutomaticLogin=root #默认启动桌面环境后以 root 用户自动登录
2、远程桌面设置
RDP 协议远程登录需要安装 XRDP,需要 epel 源
yum install epel-release -y
或者
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install -y xrdp
XRDP 会调用 VNC,安装 tigervnc-server(此处测试以 tigervnc 为例)
yum install -y tigervnc-server
启动 XRDP 并设置开机启动
systemctl start xrdp
systemctl enable xrdp
开放 3389 端口,或者关闭防火墙
firewall-cmd --permanent --zone=public --add-port=3389/tcp
firewall-cmd --reload
关闭防火墙并禁止防火墙开机启动
systemctl stop firewalld
systemctl disable firewalld
三、Windows 本地客户端测试
以上配置完成后,可以使用 Windows 自带的 mstsc 工具进行测试。
1、运行 mstsc
打开开始界面中的 “运行” 或者 “WIN+R” 调用 “运行“。
2、进行连接
输入 IP 地址,默认端口为 3389。
3、连接成功
进入以下界面,输入资产登录的用户名和密码。
连接成功!
四、JumpServer 纳管图形化界面的 Linux
1、创建系统用户
创建普通用户并选定 RDP 主机协议。
确认协议为 RDP。
RDP 协议的系统用户。
2、创建资产
创建带有 RDP 协议的资产
3、创建授权规则
将新创建的资产授权给 JumpServer 用户。
4、访问
使用 Web 终端即可进行访问
Web GUI 方式
RDP 客户端方式
在 RDP 方式连接下,目前版本无录像审计功能。
四、连接报错
1、连接后黑屏
修改 /etc/xrdp/startwm.sh 文件,在下图的位置加入这两行
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
重启生效
sudo systemctl restart xrdp
2、登陆时还需要再输入一遍密码
图形界面会自动锁屏,登陆时 XRDP 已经验证了一遍,但锁屏后还会要求再输入一遍密码。解决方式是关闭自动锁屏。
注意!关闭锁屏要在远程的界面操作。
打开 Privacy 设置。
关闭锁屏(Screen Lock)功能。
3、普通用户远程登陆时提示认证
描述信息一般是:
- 需要授权来创建色彩管理设备 / Authentication is required to create a color managed device
- 需要授权来移除色彩管理设备 / Authentication is required to remove a color managed device
- 刷新系统软件源需要认证 / Authentication is required to refresh the system repositories
解决方法,创建文件 /etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla 并写入下面内容。
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
删除 /var/crash/ 目录下的所有文件,然后重启服务器。
4、root 账户登录图形界面失败
修改 gdm 配置
修改 /etc/pam.d/gdm-autologin,注释掉第三行,# auth required pam_succeed_if.so user != root quiet_success。
修改 /etc/pam.d/gdm-password,注释掉第三行,# auth required pam_succeed_if.so user != root quiet_success。
修改profile
修改 /root/.profile,屏蔽最后一行,并添加一行 tty -s && mesg n || true。
猜你喜欢
- 2024-11-19 允许某个资产通过某个 IP 登录 JumpServer 之后进行连接的设定
- 2024-11-19 JumpServer 对接其他认证方式后的等待时间的设置
- 2024-11-19 Jumpserver 任意命令执行漏洞分析报告
- 2024-11-19 操作指南|JumpServer与Keycloak集成对接
- 2024-11-19 使用frp+jumpserver集中管理远程内网服务器
- 2024-11-19 网站未动,跳板机Jumpserver先行
- 2024-11-19 Jumpserver 通过 SSH 连接资产
- 2024-11-19 【堡垒机V3】JumpServer 组件相关的常见问题
- 2024-11-19 最新JumpServer未授权访问漏洞(CVE-2023-42442)分析
- 2024-11-19 使用国产操作系统Deepin第二十九天,JumpServer连Deepin图形界面
你 发表评论:
欢迎- 最近发表
- 标签列表
-
- powershellfor (55)
- messagesource (56)
- aspose.pdf破解版 (56)
- promise.race (63)
- 2019cad序列号和密钥激活码 (62)
- window.performance (66)
- qt删除文件夹 (72)
- mysqlcaching_sha2_password (64)
- ubuntu升级gcc (58)
- nacos启动失败 (64)
- ssh-add (70)
- jwt漏洞 (58)
- macos14下载 (58)
- yarnnode (62)
- abstractqueuedsynchronizer (64)
- source~/.bashrc没有那个文件或目录 (65)
- springboot整合activiti工作流 (70)
- jmeter插件下载 (61)
- 抓包分析 (60)
- idea创建mavenweb项目 (65)
- vue回到顶部 (57)
- qcombobox样式表 (68)
- vue数组concat (56)
- tomcatundertow (58)
- pastemac (61)
本文暂时没有评论,来添加一个吧(●'◡'●)