xshell出现WARNING!The remote SSH server rejected X11 forwarding request.
xshell出现WARNING!The remote SSH server rejected X11 forwarding request.
The remote SSH server rejected X11 forwarding request.
[root@ShuaiJhou ~]# vim /etc/ssh/sshd_config
在X11这行改为X11Forwarding yes,
然后再将UseLogin参数为no,可能这一行最开始是被注释,去掉注释,保存之后重启sshd服务,重新连接即可
[root@ShuaiJhou ~]# vim /etc/ssh/sshd_config
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
# WARNING: 'UsePAM no' is not supported in Red Hat Enterprise Linux and may cause several
# problems.
UsePAM yes
#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation sandbox
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
[root@ShuaiJhou ~]# systemctl restart sshd
如果还不行检查 xorg-x11-xauth 的rpm包是否安装,未安装则进行下面操作
[root@ShuaiJhou ~]# yum install xorg-x11-xauth