1

$ ssh -Xvv remote_host outputs

....
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

Tried also -Y. Doesn't work.

I confirmed that X11 forwarding is allowed on the server side. $grep X11 /etc/ssh/sshd_config gave

X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes

I have searched other posts related to X11 forwarding request failed on channel 0 and found no help info.

1 Answer 1

0

I had a similar issue on Devuan (fork of Debian without systemd).

I found a solution on an Arch Wiki.

Edit /etc/ssh/sshd_config (on the server side) and set:

AddressFamily inet

The default is AddressFamily any but this does not seem to supply an inet (ipv4) socket.

On my system I noted in /var/log/auth.log:

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

After the above change to sshd_config and service ssh restart the X11 forwarding worked for me.

1
  • Presumably it would be sufficient for the client to make an IPv4 connection? And easier to arrange, without denying IPv6 access to those who want/need it? Jun 24, 2021 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.