gpt4 book ai didi

ssh - X11转发无法打开显示(客户端被拒绝?)

转载 作者:行者123 更新时间:2023-12-02 14:20:20 25 4
gpt4 key购买 nike

我读过类似的问题,并已应用了建议,但似乎都无法解决我的问题...

在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)]

我还验证了Windows的防火墙没有阻止xming。

不知道它是否有意义,但是远程debian正在运行在beaglebone黑色上。

最佳答案

您不应将DISPLAY变量指向您自己的计算机。而是,SSH将从通过其连接的远程计算机到本地计算机的连接建立隧道。当您使用Putty / SSH登录时,它将设置一个DISPLAY变量:

$ echo $DISPLAY
localhost:10.0

xterm将连接到此“本地”显示,它实际上是您的xming服务器,并通过SSH连接安全地转发。

关于ssh - X11转发无法打开显示(客户端被拒绝?),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38189506/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com