Solved X11 forwarding from Linux

I have X11 forwarding working fine with minimal fuss between two FreeBSD boxes. I run into problems when I try to run X11 applications installed on a Linux box using either FreeBSD box.
Code:
X11 forwarding request failed on channel 0
Same error using either the -X or -Y switches. Running ssh -v gives little more that I can see, other than a mention of spoofing that I'm unsure of.
Code:
debug1: Authentication succeeded (publickey).
Authenticated to [REMOVED_HOSTNAME] ([REMOVED_HOSTNAME]:22).
debug1: HPN to Non-HPN Connection
debug1: Final hpn_buffer_size = 2097152
debug1: HPN Disabled: 0, HPN Buffer Size: 2097152
debug1: channel 0: new [client-session]
debug1: Enabled Dynamic Window Scaling

debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
debug1: Requesting X11 forwarding with authentication spoofing.
X11 forwarding request failed on channel 0
I can successfully forward applications installed on either FreeBSD box to the Linux box. Both FreeBSD boxes are 10.1-STABLE. The Linux box is Arch Linux, with ssh version 6.8p1 and OpenSSL 1.0.2a. Not really sure where the problem lies.
 
Given the symptoms, I have the impression the problem lies on the Linux box side. Have you followed the steps described here ? On the FreeBSD side, the problem would come from the SSH client configuration file /etc/ssh/ssh_config. But since it works between two FreeBSD boxes, I guess the default is fine. I use X11 forwarding myself from a Debian box (on bhyve) to my FreeBSD desktop and I had only to change configurations on the Linux box side.
 
Make sure the Linux host is actually running Xorg. I'm not sure if Wayland or Unity support remote displays.
 
It was a misconfiguration on the Linux host. I thought I had turned on forwarding in sshd_config, but forgot to uncomment the line. It's working perfectly fine now, and I feel a little ditzy.

Just an FYI for anyone finding this thread in a search though, there doesn't even need to be an X server installed let alone running on the remote host to forward X11 applications over ssh. You only need an X server running on the client machine. I do it all the time to run programs on a headless server. Very useful.
 
Back
Top