X11 forwarding request failed on channel 0

Standard

When trying to connect via ssh to a CentOS 6 server to invoke a GTK+ application, I received this message.
$ ssh root@192.168.200.233 -X
root@192.168.200.233's password:
X11 forwarding request failed on channel 0
Last login: Thu Apr 12 08:15:43 2012 from 192.168.201.151

After double check on my client Arch linux the /etc/ssh/ssh_config file and corroborate that “ForwardX11 yes” was uncommented, began to search the web for a bug in CentOS’s openssh.

Firsts impressions and answers said that it was my openssh client’s fault… then I installed putty, enabled X11 Forwarding and tried again. Now it connected without saying nothing but when I tried to open the graphical application, it said this
# system-config-lvm
Unable to initialize graphical environment. Most likely cause of failure is that the tool was not run using a graphical environment. Please either start your graphical user interface or set your DISPLAY variable. Caught exception: could not open display

So it wasn’t openssh’s fault as someone said. Doing a bit more of research gave me the correct answer. Finally I found a bug on CentOS 5 bugzilla where is explained in detail.

My problem was that xorg-x11-xauth wasn’t installed on my system (I did a minimal instalation). By installing xorg-x11-xauth and rebooting the server (until I did, it did not work), it connects without problems by typing

$ ssh root@IP_ADDRESS -Y

I tried with the -X parameter instead -Y, but it gave me some problems. With -Y it works like a charm!

About these ads

10 thoughts on “X11 forwarding request failed on channel 0

  1. Hi @TrinitronX,

    What OS are you using as client? Ubuntu perhaps?

    That “AddressFamily” workaround sound to me to a issue with ubuntu.
    Isn’t it the other potential solution you mentioned, to corroborate you have xauth installed in your system?

    Regards

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s