Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-18-2012, 07:48 AM
|
#1
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,681
|
SSH: X11 forwarding request failed on channel 0
I have a PC with SSH server installed and often connect to it from my netbook (both running Sid) with X forwarding enabled. Since the other day when I connect to the PC I receive the message "X11 forwarding request failed on channel 0" and X forwarding no longer works.
On the host Pc I see the following in auth.log:
Code:
sshd[3786]: error: Failed to allocate internet-domain X11 display socket.
I read around and saw mention that adding "AddressFamily inet" to sshd_conf solved this for some people but I still have the same problem after adding it.
I also tried running "xhost +" from the host PC but this has had no effect either.
I recall I struggled to set up X forwarding in the first place as I'm not at all familiar with setting it up so if anyone has any suggestions of anything else I could try I would be very grateful.
|
|
|
05-19-2012, 04:13 AM
|
#2
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,546
|
I found this:
it is a known bug from openssh. You can prove and see the reason, when you start sshd in debug modus: it tries to open several hundreds unix-sockets till it reaches a limit.
and also I found the following tips here: http://dbaspot.com/solaris/397531-s1...g-problem.html
disable ipv6 in general
add AddressFamily inet" to sshd_config
add "X11UseLocalhost no" to sshd_config
set IPv4 explicitly in sshd_config
and also found this comment: "if on the remote host I touch hostname6.lo0 I get the remote display."
I know that is and old solaris thread, but maybe you can try some of them (if not yet done). I'm really interested if it was a such an old bug in openssh.
|
|
1 members found this post helpful.
|
05-19-2012, 06:39 AM
|
#3
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,681
Original Poster
|
Thanks, adding "X11UseLocalhost no" seems to work (I don't see the error) but when trying to open an application I receive the error "Error: Can't open display: netbook:10.0" and the application doesn't open. I tried the -4 option on the client too but that doesn't change anything.
I don't know how to set the IP6 options mentioned.
I do wonder if this is possibly an X permissions issue and there's something simple I'm missing.
|
|
|
05-19-2012, 06:56 AM
|
#4
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,546
|
The can't open display message is a good news I think. The connection is ok, you have an authentication problem. Maybe the sshd is run by root and it has no right to access your display (or something similar)
|
|
|
05-19-2012, 07:06 AM
|
#5
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,681
Original Poster
|
My apologies, the error was "Error: Can't open display: PC:10.0". I tried running "xhost +" after the error and reconnecting but I still receive the same error.
|
|
|
05-19-2012, 07:11 AM
|
#6
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,546
|
where did you execute xhost +?
|
|
|
05-19-2012, 07:16 AM
|
#7
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,681
Original Poster
|
Quote:
Originally Posted by pan64
where did you execute xhost +?
|
On the PC (the server) initially but now I've executed it on both and with the same error (Error: Can't open display: PC:10.0) as a result.
|
|
|
05-19-2012, 07:19 AM
|
#8
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,546
|
can you check if the port is opened or the ssh channel is available? (so it is a problem with ssh or with X)
|
|
|
05-19-2012, 07:21 AM
|
#9
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,681
Original Poster
|
I'm not sure what you mean? I can SSH into the PC fine, it's just X forwarding that's failing. I've no firewall or anything installed on the PC or netbook and X forwarding works the other way.
|
|
|
05-19-2012, 07:36 AM
|
#10
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,546
|
usually X server opens a port for every display.
:0 will be listening on 6000, :1 on 6001, .... :10 on 6010.
So when you create X forwarding ssh will open the port 6010 on your PC and forwards to port 6000 on your laptop.
|
|
|
05-19-2012, 07:48 AM
|
#11
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,681
Original Poster
|
When I run netstat I'm seeing this:
Code:
tcp 0 0 *:6010 *:* LISTEN 5304/1
so I think the port's open.
|
|
|
05-19-2012, 07:59 AM
|
#12
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,546
|
that is fine, so it means it should be an x authentication or security problem. Try ssh -X and ssh -Y, see the man page of ssh, maybe you will find it.
|
|
|
05-19-2012, 08:03 AM
|
#13
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,681
Original Poster
|
I've tried both X and Y options to the same effect. My problem is I have no idea how to solve an X authentication issue "xhost +" is about as much as I know how to do.
|
|
|
05-19-2012, 08:27 AM
|
#14
|
LQ Addict
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,546
|
Where did you the ssh command executed from?
|
|
|
05-19-2012, 08:39 AM
|
#15
|
LQ Addict
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,681
Original Poster
|
I'm executing ssh on my netbook to connect to my PC.
|
|
|
All times are GMT -5. The time now is 11:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|