Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

X11 forwarding request failed on channel 0

When I do "ssh -X abcserver", I got message "X11 forwarding request failed on channel 0". I checked online and it was suggested to solve it by switching "X11UseLocalhost no" to "X11UseLocalhost yes".

However, both my manager and I don't have this administrative privilege. I am wondering, except this solution, whether there is another option to solve the issue ? I also don't have sudo privilege to directly install X11 on the server.

My local platform is:

Linux version 3.16.0-4-amd64 ([email protected]) (gcc version 4.8.4 (Debian 4.8.4-1) ) #1 SMP Debian 3.16.7-ckt25-2+deb8u3 (2016-07-02) 

The remote platform is:

Linux version 3.13.0-88-generic (buildd@lgw01-16)  (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) )  #135-Ubuntu SMP Wed Jun 8 21:10:42 UTC 2016 
like image 936
David Z Avatar asked Aug 15 '16 19:08

David Z


People also ask

How do I fix X11 forwarding?

The broken X11 forwarding error may also happen if the remote host where SSH server is running has IPv6 disabled. To fix the error in this case, open /etc/ssh/sshd_config file, and uncomment AddressFamily all (if any).

How do I enable X11 forwarding in PuTTY?

In PuTTY for Windows, you can enable X forwarding in new or saved SSH sessions by selecting Enable X11 forwarding in the "PuTTY Configuration" window (Connection > SSH > X11).

How do you check X11 forwarding is working?

To test to make sure X11 is working properly, run “xeyes” and a simple GUI should appear on the screen. That's it!

What is X11 forwarding?

X11 forwarding is a mechanism that allows a user to start up remote applications, and then forward the application display to their local Windows machine. It enables you to run GUIs from a local server. It's essentially remote desktop software that looks better on your screen and is easier to work with.


1 Answers

Adding the -v option to ssh when trying to log in will give a lot of debug information which might give a clue to exactly what the problem is, like for instance

debug1: Remote: No xauth program; cannot forward with spoofing. 

which in my case installing xauth on the server fixed the issue.

like image 139
hlovdal Avatar answered Oct 14 '22 03:10

hlovdal