1、Linux操作系统中安装X11相关安装包
yum install -y xorg-x11-xauth xorg-x11-fonts-* xorg-x11-font-utils xorg-x11-fonts-Type1 xclock
2、修改/etc/ssh/sshd_config配置文件
vim /etc/ssh/sshd_config
部分内容如下:
...
AllowAgentForwarding yes
AllowTcpForwarding yes
GatewayPorts no
X11Forwarding yes #将X11Forwarding去掉注释改为yes
X11DisplayOffset 10
X11UseLocalhost no #将X11UseLocalhost去掉注释改为no
PermitTTY yes
PrintMotd yes
3、重启ssh服务
1、linux6:
service sshd restart
2、linux7:
systemctl restart sshd.service
评论(0)