38.xshell出現(xiàn)WARNING!The remote SSH server rejected X11 forwarding request.

xshell出現(xiàn)WARNING!The remote SSH server rejected X11 forwarding request.

xshell出現(xiàn)WARNING!The remote SSH server rejected X11 forwarding request.

The remote SSH server rejected X11 forwarding request.
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參數(shù)為no,可能這一行最開始是被注釋,去掉注釋,保存之后重啟sshd服務(wù),重新連接即可

[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包是否安裝,未安裝則進(jìn)行下面操作

[root@ShuaiJhou ~]# yum install xorg-x11-xauth

成功解決
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容