채널 0에서 X11 전달 요청이 실패했습니다.

채널 0에서 X11 전달 요청이 실패했습니다.

$ ssh -Xvv remote_host산출

....
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: exec
debug1: client_input_global_request: rtype [email protected] 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

X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

다른 관련 게시물을 검색했지만 X11 forwarding request failed on channel 0도움이 되지 않았습니다.

답변1

Devuan(systemd가 없는 Debian 지점)에서도 비슷한 문제가 있었습니다.

내가 찾은Arch Wiki의 솔루션.

/etc/ssh/sshd_config서버 측에서 편집 하고 다음을 설정합니다.

AddressFamily inet

기본값은 이지만 AddressFamily anyinet(ipv4) 소켓을 제공하지 않는 것 같습니다.

내 시스템의 /var/log/auth.log에서 확인했습니다.

sshd[9184]: error: Failed to allocate internet-domain X11 display socket.

위의 변경 후에 sshd_configX11 service ssh restart전달이 저에게 효과적이었습니다.

답변2

일반적으로 질문 제목에 오류 메시지가 표시되면 서버에 xauth해당 명령이 포함된 패키지가 설치되어 있지 않거나 데몬이 sshd다른 이유로 명령을 사용할 수 없다는 의미입니다.xauth

관련 정보