Servidor SSH rejeitou o pedido de encaminhamento X11

0

Env: centos 7, xshell, xmanager.

Eu tenho duas máquinas virtuais centos7, uma das quais pode abrir o navegador Chrome com sucesso através do encaminhamento X11 na sessão SSH, mas outra não pode.

O normal :

[root@localhost ~]# google-chrome --no-sandbox
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast
[16458:16458:0523/075723.020611:ERROR:gl_surface_glx.cc(419)] GLX 1.3 or later is required.
[16458:16458:0523/075723.020636:ERROR:gl_initializer_x11.cc(153)] GLSurfaceGLX::InitializeOneOff failed.
[16458:16458:0523/075723.022497:ERROR:gpu_child_thread.cc(254)] Exiting GPU process due to errors during initializat
[16393:16422:0523/075723.081833:ERROR:browser_gpu_channel_host_factory.cc(108)] Failed to launch GPU process.
[root@localhost ~]# [0523/075728.166795:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandb
Most likely you need to configure your SUID sandbox correctly

O anormal:

WARNING! The remote SSH server rejected X11 forwarding request.

[root@yxs ~]# google-chrome --no-sandbox

(google-chrome:10346): Gtk-WARNING **: cannot open display: 
[root@yxs ~]# [0523/202401.444038:ERROR:nacl_helper_linux.cc(310)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
^C
[root@yxs ~]# su yxs
[yxs@yxs root]$ google-chrome

(google-chrome:10407): Gtk-WARNING **: cannot open display: 

As seguintes configurações dos dois são quase iguais.

O normal:

[root@localhost ~]# cat /etc/ssh/sshd_config | grep X11
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#   X11Forwarding no
[root@localhost ~]# rpm -qa | grep xauth
xorg-x11-xauth-1.0.9-1.el7.x86_64
[root@localhost ~]# ssh -V
OpenSSH_6.6.1p1, OpenSSL 1.0.1e-fips 11 Feb 2013
[root@localhost ~]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 
[root@localhost ~]# echo $DISPLAY
localhost:10.0

#enable ipv6
#minimal centos

O anormal:

[root@yxs ~]# cat /etc/ssh/sshd_config | grep X11
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#   X11Forwarding no
[root@yxs ~]#  rpm -qa | grep xauth
xorg-x11-xauth-1.0.9-1.el7.x86_64
[root@yxs ~]# ssh -V
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips  26 Jan 2017
[root@yxs ~]# echo $DISPLAY

[root@yxs ~]#

#disbale ipv6
#has installd "GNOME Desktop"

Eu tentei executar export DISPLAY=localhost:10.0 na máquina virtual anormal, mas quando eu reiniciei, a variável de ambiente $DISPLAY ficou vazia novamente.

Eu não consigo abrir o comando Chrome By google-chrome --no-sandbox por meio da sessão SSH no Xshell. Mas eu posso usar normalmente através da janela do VNC no gerenciamento de máquinas virtuais.

    
por SeanYe 23.05.2018 / 13:20

1 resposta

0

Só porque eu desabilito o IPv6, eu preciso adicionar o AddressFamily inet ao / etc / ssh / sshd_config., eu era muito descuidado antes. Me desculpe.

A terceira resposta: Link

    
por 24.05.2018 / 10:59

Tags