我读过类似的问题,并应用了发布的建议,但似乎没有一个能解决我的问题......
在 Putty 中,我启用了 x11 转发,将“X 显示位置”设置为 0.0
远程 Debian 8.4 的 X 版本是 1.16.4,其中 /etc/ssh/ssh_config 设置为:
ForwardX11 yes
ForwardX11 Trusted yes
和 /etc/ssh/sshd_config:
X11Forwarding yes
我还强制 DISPLAY 变量指向我本地机器的 IP:
export DISPLAY=192.168.1.140:0.0
并验证它设置正确(使用'echo $DISPLAY')
最后,我重新启动:'service ssh restart' 和'service sshd restart'。不幸的是,当我输入 'xterm&' 时,我收到错误“无法打开显示:%s”,并且本地运行的 xming (Win8) 从不显示任何内容。
Xming 日志似乎显示身份验证错误:
winClipboardProc - Hello
DetectUnicodeSupport - Windows Vista
winClipboardProc - DISPLAY=127.0.0.1:0.0
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
winClipboardProc - XOpenDisplay () returned and successfully opened the display.
AUDIT: Mon Jul 04 09:40:48 2016: 2508 C:\Program Files (x86)\Xming\Xming.exe: client 4 rejected from IP 192.168.1.151
[Note: the 192.168.1.151 is the IP of the BBB (ifconfig -a)]
我还验证了 Window 的防火墙没有阻止 xming。
不确定它是否重要,但远程 debian 运行在 beaglebone black 上。