要在服务器客户端上启用 X11 转发,请编辑文件“/etc/ssh/ssh_config”并在 ssh 服务器上编辑文件“/etc/ssh/sshd_config”并执行以下相应的配置更改。
对于 CentOS/RHEL 5,6
X11转发(X11 Forwarding)
取消注释“# ForwardX11”行并将“ForwardX11 no”更改为“ForwardX11 yes”
ForwardX11 yes
可信 X11 转发
取消注释“# ForwardX11Trusted”行并将“ForwardX11Trusted no”更改为“ForwardX11Trusted yes”
# If this option is set to yes then remote X11 clients will have full access # to the oroirnal X11 display. As virtually no X11 client supports the untrusted # mode correctly we set this to yes. ForwardX11Trusted yes
- 每次更改后重新启动 sshd 服务或者重新启动系统。
# service sshd restart
https://onitroad.com 更多教程
对于 CentOS/RHEL 7
X11转发
- 取消注释以下几行:
X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost no
- 启动并启用sshd服务
# systemctl start sshd.service # systemctl enable sshd.service
日期:2020-09-17 00:13:36 来源:oir作者:oir