首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >X11转发请求在通道0上失败

X11转发请求在通道0上失败
EN

Unix & Linux用户
提问于 2020-11-24 10:30:37
回答 2查看 1.8K关注 0票数 2

$ ssh -Xvv remote_host输出

代码语言:javascript
复制
....
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: exec
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Remote: /home/user/.ssh/authorized_keys:8: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug1: Remote: /home/user/.ssh/authorized_keys:8: key options: agent-forwarding port-forwarding pty user-rc x11-forwarding
debug2: channel_input_open_confirmation: channel 0: callback start
debug2: x11_get_proto: /usr/bin/xauth  list unix:16.0 2>/dev/null
debug1: Requesting X11 forwarding with authentication spoofing.
debug2: channel 0: request x11-req confirm 1
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.
debug1: Sending env LANG = en_US.UTF-8
debug2: channel 0: request env confirm 0
debug2: channel 0: request shell confirm 1
debug2: channel_input_open_confirmation: channel 0: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 100 id 0
X11 forwarding request failed on channel 0
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0

也试过-Y。不起作用。

我确认服务器端允许X11转发。$grep X11 /etc/ssh/sshd_config

代码语言:javascript
复制
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

我已经搜索了其他与X11 forwarding request failed on channel 0相关的帖子,没有发现任何帮助信息。

EN

回答 2

Unix & Linux用户

发布于 2021-06-24 01:59:29

我在Devuan (没有系统的Debian叉子)上也有类似的问题。

我找到了关于Arch Wiki的一种解法

编辑/etc/ssh/sshd_config (在服务器端)并设置:

代码语言:javascript
复制
AddressFamily inet

默认情况下是AddressFamily any,但这似乎没有提供inet (ipv4)套接字。

在我的系统中,我在/var/log/auth.log中注意到:

代码语言:javascript
复制
sshd[9184]: error: Failed to allocate internet-domain X11 display socket.

在对sshd_configservice ssh restart的上述更改之后,X11转发为我工作。

票数 1
EN

Unix & Linux用户

发布于 2023-03-07 23:32:11

通常,当我看到问题标题的错误消息时,这意味着服务器没有安装包含xauth命令的包,或者sshd守护进程由于其他原因不能使用xauth命令。

票数 0
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/621285

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档