Mailing List Archive

X11 forwarding issues with Linux
I think I might have a bug here, but I'm not sure.

I just cannot seem to win with X11 forwarding and OpenSSH-1.2.2! The shell works fine though.

When I had the Linux 2.2.11 kernel running, sshd was saying:

debug: Received request for X11 forwarding with auth spoofing.
debug: Socket family 10 not supported [X11 disp create]
debug: channel 0: new [X11 inet listener]
debug: Forking shell.

The code in channels.c suggested that I had compiled OpenSSH to use IPv6 and that my system was not capable of IPv6. Sure enough, I had not compiled it into the kernel.

After I compiled it in, with the 2.3.42 kernel, sshd was saying this:

debug: Received request for X11 forwarding with auth spoofing.
debug: bind port 6010: Address already in use
debug: bind port 6011: Address already in use
...
debug: bind port 6998: Address already in use
debug: bind port 6999: Address already in use
error: Failed to allocate internet-domain X11 display socket.
debug: Forking shell.

And I honestly cannot tell at this point why bind() is failing.

I also tried compiling --with-ipv4-default on both the client and the server and got the same thing. Which seems even wierder.

Anyone know what is going wrong or have some suggestions for debugging?

I only compiled IPv6 into the server kernel. Does the client need it as well?

Thanks.

-Steve Maring
smaring@linuxstart.com

----------------------
Do you do Linux? :)
Get your FREE @linuxstart.com email address at: http://www.linuxstart.com
Re: X11 forwarding issues with Linux [ In reply to ]
Hi,

>I think I might have a bug here, but I'm not sure.
>
>I just cannot seem to win with X11 forwarding and OpenSSH-1.2.2!
>The shell works fine though.
:
>After I compiled it in, with the 2.3.42 kernel, sshd was saying this:
>
>debug: Received request for X11 forwarding with auth spoofing.
>debug: bind port 6010: Address already in use
>debug: bind port 6011: Address already in use
>...
>debug: bind port 6998: Address already in use
>debug: bind port 6999: Address already in use
>error: Failed to allocate internet-domain X11 display socket.
>debug: Forking shell.

This is because the Linux kernel won't have sockets
bound to the same ports even in different families (like IPv6 and
IPv4).
(This problem also exists in old IPv6 patch for ssh-nonfree.)

I've made a patch and it is available at
<http://chiharu.v6.linux.or.jp/pub/Linux/IPv6-2/openssh/openssh-1.2.2.linux-20000214.patch.gz>

It also fixes the IPv4-mapped address problem (sshd on IPv6 node
warns connections from ssh/IPv4).


Thanks.

--
Hideaki YOSHIFUJI <yoshfuji@ecei.tohoku.ac.jp>
Web Page: http://www.ecei.tohoku.ac.jp/%7Eyoshfuji/
PGP5i FP: F731 6599 5EB2 BBA7 1515 1323 1806 A96F 5700 6B25