X11 forward not working with Debian/Ubuntu, but OK with CentOS

1,023 views
Skip to first unread message

Thomas Mejer Hansen

unread,
Feb 19, 2015, 4:36:28 AM2/19/15
to gce-dis...@googlegroups.com
Hi 
I have for some time had the problem that I am unable forward X11 traffic using ssh when connecting to Debian/Ubuntu (12.04 and 12.10 I tested) servers running on GCE.
If I run an instance of CentOS it works fine after xauth is installed. But, I would like to use Ubuntu as my server.

I conect using:

"
>> gcloud compute ssh --zone "europe-west1-b" --ssh-flag="-X" instance-1
X11 forwarding request failed on channel 0
Welcome to Ubuntu 12.04.5 LTS (GNU/Linux 3.13.0-44-generic x86_64)
"

in /var/log/auth I notice the following entry
"
Feb 19 09:21:27 instance-1 sshd[2459]: error: Failed to allocate internet-domain X11 display socket.
"

Searching google I find that many have solved this problem by adding 
"
      AddressFamily inet
"
to /etc/ssh/ssh_config, followed by restarting ssh

However. This has no effect for me..

BTW. I connect from an laptop running Ubuntu.

I hope anyone can help me fix this. I really need X11 forwarding for a few crucial things.

- Thomas


Adrian Barbachano

unread,
Feb 19, 2015, 11:11:34 AM2/19/15
to gce-dis...@googlegroups.com

Hi,


As per your message I understand that you modified the SSH client configuration file (/etc/ssh/ssh_config) instead of the SSH daemon configuration file (/etc/ssh/sshd_config).


I have been able to forward X11 in Debian and Ubuntu 12.10 (official images) by adding ‘AddressFamily inet’ to the /etc/ssh/sshd_config and restarting the server: sudo /etc/init.d/ssh restart.


Could you confirm if it was a typo? Did you manage to make it work?


Thanks,

Adrián B.

Thomas Mejer Hansen

unread,
Feb 19, 2015, 3:19:07 PM2/19/15
to gce-dis...@googlegroups.com
Hi Adrian

Thank you very much. It was not a typo.. I edited the wrong file. Thank you for pointing that out..

I did though find that 
sudo /etc/init.d/ssh restart 
did not have any effect (nor did it provide any output)

But,  when I tried 
sudo service ssh restart

all was good, and I can now use SSH with X11 forwarding.

Thank you very much for the help
- Thomas
Reply all
Reply to author
Forward
0 new messages