X11 转发不起作用

X11 转发不起作用

我对 X11 有一个困惑的问题。

我在桌面上运行 Ubuntu 19.10,从那里我可以通过 ssh 连接到服务器 A,其中 X11 转发运行良好(即我客户端上的 X11 运行正常),但另一方面,如果我尝试使用 X11 连接到另一台服务器 B,那么它就不起作用。

但实际上,服务器 B 上的 X11 没问题,因为当我通过我的笔记本电脑(安装有 Ubuntu 18.04)连接到它时,它可以工作!

这是我从中获得的信息ssh -v -X

debug1: Requesting X11 forwarding with authentication spoofing.
debug1: Sending environment.
.... 
debug1: client_input_channel_open: ctype x11 rchan 2 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 49834
debug1: channel 1: new [x11]
debug1: confirm x11
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 49860
debug1: channel 2: new [x11]
debug1: confirm x11
debug1: client_input_channel_open: ctype x11 rchan 4 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 49878
debug1: channel 3: new [x11]
debug1: confirm x11
debug1: channel 1: FORCE input drain

这很奇怪,因为常用的解决方案(编辑/etc/ssh/ssh_config)不起作用。而使用 Ubuntu 18.04,一切都开箱即用!

我比较了 Ubuntu18.04@laptop 成功案例和 Ubuntu19.10@desktop 不成功案例的输出,唯一显着的区别是消息FORCE input drain

更完整的输出ssh -vvv -X给了我这个(请注意,我正在尝试打开一个gnuplot窗口来测试 X11):

gnuplot> p x w l
debug3: receive packet: type 90
debug1: client_input_channel_open: ctype x11 rchan 2 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 52382
debug2: fd 7 setting O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [x11]
debug1: confirm x11
debug3: send packet: type 91
debug2: channel 1: rcvd adjust 34784
debug3: receive packet: type 90
debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 52394
debug2: fd 8 setting O_NONBLOCK
debug3: fd 8 is O_NONBLOCK
debug1: channel 2: new [x11]
debug1: confirm x11
debug3: send packet: type 91
debug3: receive packet: type 90
debug1: client_input_channel_open: ctype x11 rchan 4 win 65536 max 16384
debug1: client_request_x11: request from 127.0.0.1 52398
debug2: fd 9 setting O_NONBLOCK
debug3: fd 9 is O_NONBLOCK
debug1: channel 3: new [x11]
debug1: confirm x11
debug3: send packet: type 91
debug2: channel 1: rcvd adjust 33588
debug2: channel 1: rcvd adjust 46612
debug2: channel 1: rcvd adjust 37976
debug2: channel 1: rcvd adjust 45940
debug2: channel 1: rcvd adjust 33144
debug3: receive packet: type 96
debug2: channel 1: rcvd eof
debug2: channel 1: output open -> drain
debug2: channel 1: obuf empty
debug2: channel 1: chan_shutdown_write (i0 o1 sock 7 wfd 7 efd -1 [closed])
debug2: channel 1: output drain -> closed
debug1: channel 1: FORCE input drain
debug2: channel 1: ibuf empty
debug2: channel 1: send eof
debug3: send packet: type 96
debug2: channel 1: input drain -> closed
debug2: channel 1: send close
debug3: send packet: type 97
debug3: channel 1: will not send data after close
debug3: channel 1: will not send data after close
Warning: slow font initialization
debug3: channel 1: will not send data after close
debug3: channel 1: will not send data after close
gnuplot> 
debug3: channel 1: will not send data after close

有人知道这是什么吗?也许是 Ubuntu 19.10 中的一些错误?

相关内容