重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 27|回复: 0
打印 上一主题 下一主题

[系统管理] X11 forwarding request failed on channel 0

[复制链接]
跳转到指定楼层
楼主
发表于 前天 11:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
LINUX最小安装 LINUX到LINUX SSH 登录报

X11 forwarding request failed on channel 0

如:

[root@dns ~]# ssh -XY root@host01.example.com
root@host01.example.com's password:
X11 forwarding request failed on channel 0
Last login: Sat Jun 29 11:23:09 2024 from 192.168.133.254

通过WINDOWS的CRT登录,可以显示图形界面,但通过LINUX使用SSH 访问就会存在这个问题。

原因是 服务器端没有安装 xauth

安装后,问题解决:

[root@host01 ~]# yum install xauth
Loaded plugins: ulninfo
Resolving Dependencies
--> Running transaction check
---> Package xorg-x11-xauth.x86_64 1:1.0.9-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==================================================================================================================================================================================================================================
Package                                                   Arch                                              Version                                                  Repository                                             Size
==================================================================================================================================================================================================================================
Installing:
xorg-x11-xauth                                            x86_64                                            1:1.0.9-1.el7                                            ol7_latest                                             29 k

Transaction Summary
==================================================================================================================================================================================================================================
Install  1 Package

Total download size: 29 k
Installed size: 48 k
Is this ok [y/d/N]: yes
Downloading packages:
xorg-x11-xauth-1.0.9-1.el7.x86_64.rpm                                                                                                                                                                      |  29 kB  00:00:03     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:xorg-x11-xauth-1.0.9-1.el7.x86_64                                                                                                                                                                            1/1
  Verifying  : 1:xorg-x11-xauth-1.0.9-1.el7.x86_64                                                                                                                                                                            1/1

Installed:
  xorg-x11-xauth.x86_64 1:1.0.9-1.el7                                                                                                                                                                                             

Complete!
[root@host01 ~]#


之后,再去登录,就不再报 :X11 forwarding request failed on channel 0

[root@dns ~]# ssh -XY root@host01.example.com
root@host01.example.com's password:
Permission denied, please try again.
root@host01.example.com's password:
Last failed login: Sat Jun 29 11:29:44 CST 2024 from 192.168.133.254 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Sat Jun 29 11:25:36 2024 from 192.168.133.254
/usr/bin/xauth:  file /root/.Xauthority does not exist


[root@host01 ~]# nm-connection-editor   图形就可以出来
Gtk-Message: 11:30:05.459: Failed to load module "pk-gtk-module"
Gtk-Message: 11:30:05.459: Failed to load module "canberra-gtk-module"
Gtk-Message: 11:30:05.466: Failed to load module "pk-gtk-module"
Gtk-Message: 11:30:05.466: Failed to load module "canberra-gtk-module"





分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-7-1 15:19 , Processed in 0.088296 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表