Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 23990 - X11Forwarding broken using OpenSSH_3.6.1p2
Summary: X11Forwarding broken using OpenSSH_3.6.1p2
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Brandon Low (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-06 06:52 UTC by Axel Reimann
Modified: 2003-09-16 11:39 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Axel Reimann 2003-07-06 06:52:25 UTC
My ssh_config contains the lines: 
 Host * 
   ForwardAgent yes 
   ForwardX11 yes 
on both computers to be connected. 
The sshd_config has the line: 
  X11Forwarding yes 
included. My DISPLAY variable is set, that is > echo $DISPLAY yields: 
:0.0 
 
Connecting to the other machine via ssh $USER@machine works fine, 
debug output contains: 
debug1: Requesting X11 forwarding with authentication spoofing. 
debug1: channel 0: request x11-req 
debug1: channel 0: request shell 
debug1: channel 0: open confirm rwindow 0 rmax 32768 
 
Starting any X-application fails, dumping the message: 
_X11TransSocketOpen: socket() failed for tcp 
_X11TransSocketOpenCOTSClient: Unable to open socket for tcp 
_X11TransOpen: transport open failed for tcp/localhost:10 
... Xt error: Can't open display: localhost:10.0 
 
Following the application start with strace gives some more information: 
socket(PF_INET6, SOCK_STREAM, 0)        = -1 EAFNOSUPPORT (Address family not 
supported by protocol) 
write(2, "_X11Trans", 9_X11Trans)                = 9 
write(2, "SocketOpen: socket() failed for "..., 36SocketOpen: socket() failed for tcp 
) = 36 
write(2, "_X11Trans", 9_X11Trans)                = 9 
write(2, "SocketOpenCOTSClient: Unable to "..., 52SocketOpenCOTSClient: Unable to 
open socket for tcp 
) = 52 
write(2, "_X11Trans", 9_X11Trans)                = 9 
write(2, "Open: transport open failed for "..., 49Open: transport open failed for 
tcp/localhost:10 
 
I have no idea, why INET6 is used. These lines also appear when I use 
ssh -4 $USER@machine. It's to no avail.
Comment 1 Brandon Low (RETIRED) gentoo-dev 2003-07-06 17:07:15 UTC
after you ssh, what does echo $DISPLAY give you?
Comment 2 Axel Reimann 2003-07-07 01:16:15 UTC
It says: 
localhost:10.0 
while being logged in on the remote machine. 
Comment 3 Axel Reimann 2003-07-07 01:36:53 UTC
Before stealing anyones precious time, I'd just like to make sure I've got my machine set up 
properly. I've just discovered that my ~/.xsession-errors file gives me the following warning: 
 
startkde: Starting up... 
kbuildsycoca running... 
mcop warning: user defined signal handler found for SIG_PIPE, overriding 
Can't get own host name. Your system is severely misconfigured 
 
This is funny, since 'hostname -f' or 'hostname' returns the correct (fqdn, host's name) 
answer. I don't know whom to trust. All other networking stuff (except X11Forward) 
works just fine. 
Comment 4 Brandon Low (RETIRED) gentoo-dev 2003-07-07 10:19:11 UTC
make sure that your hosts file has your hostname in it, and that you have at least bind-tools installed (if not bind itself)
Comment 5 Axel Reimann 2003-07-08 01:55:29 UTC
Ok, right now I've two machines here: juliette and shc. 
juliette is acting as a firewall, it has eth0 connected to  
the internet (dynamic ip), and eth1 serves the local 
net. Works fairly nice. The machine shc (a laptop, fixed ip) 
may connect to juliette from the local net (at home, eth1), 
or from the internet (eth0) using ssh. 
 
------------------------------------------- 
On juliette (the firewall): 
'emerge -s bind-tools' says: 
net-dns/bind-tools 
      Latest version available: 9.2.2 
      Latest version installed: 9.2.2 
      Size of downloaded files: 4,951 kB 
      Homepage:    http://www.isc.org/products/BIND/bind9-beta.html 
      Description: bind tools: dig, nslookup, and host 
 
and /etc/hosts says: 
192.168.0.153   shc 
127.0.0.1       localhost 
-------------------------------------------- 
On shc (the laptop): 
bind-tools same as above, 
/etc/hosts: 
127.0.01	shc	localhost 
192.168.0.153	shc 
-------------------------------------------- 
 
The X11Forward problem must exist on both machines alike,  
since I've used other Linux machines at work to dial in to either 
juliette or shc. While logging in works fine, X11Forwarding does not. 
All Linux machines at work do not show this behaviour, i.e.  
X11Forwarding works perfectly among them.  
On those machines, ssh -V yields: 
 
OpenSSH_3.4p1 Debian 1:3.4p1-1, SSH protocols 1.5/2.0, OpenSSL 0x0090603f 
 
When connecting from a Linux machine at work with the above ssh version to 
juliette at home, I also get: 
 
_X11TransSocketOpen: socket() failed for tcp 
_X11TransSocketOpenCOTSClient: Unable to open socket for tcp 
_X11TransOpen: transport open failed for tcp/localhost:11 
xterm Xt error: Can't open display: localhost:11.0 
 
when starting xterm for example. 
Comment 6 Axel Reimann 2003-07-08 03:36:34 UTC
On a side note, downgrading to Version 3.5p1 does not solve the problem. 
So it's most likely me being too stupid to setup my boxes properly. If no one 
else experiences the same X11Forwarding issue, this bug report might as 
well be closed. 
 
Comment 7 Axel Reimann 2003-07-27 02:04:05 UTC
I'm still trying to track the darn problem down. Enabling the sshd's DEBUG output gives 
the prints the following message to the log files: 
 
debug1: session_input_channel_req: session 0 req x11-req 
debug1: x11_create_display_inet: Socket family 10 not supported 
 
Anyone else seen this before? 
Comment 8 Benjamin Coles 2003-07-30 07:19:46 UTC
I've actually got X11 forwarding to work through putty when I'm at work with this version and the previous versions as well. My settings are pretty much like yours except the remote side, I listen on localhost:0 and I have Excursion to handle the windows. Might want to check your settings or gentoo forums on this matter. If the program you happen to use is also putty, you must exclude these host/ips localhost,127.0.0.1 because of a bug that has yet to be fixed. Find me on freenode at sj7trunks, lets see if we can get this fixed.
Comment 9 Axel Reimann 2003-07-30 08:34:02 UTC
I've changed my settings to also use localhost:0 and even tried 
putty. Still X11-Forwarding does not work. The error message has 
changed, though (trying to open a simple xterm): 
 
xterm Xt error: Can't open display $myhostname:0.0 
 
Looks slightly better, but does it help? 
 
Comment 10 Axel Reimann 2003-08-25 07:47:03 UTC
I have FINALLY solved the mystery! OpenSSH is definitely NOT the 
source of the problem. Two hints lead the way out: 
1. strace always said: 
socket(PF_INET6, SOCK_STREAM, 0)        = -1 EAFNOSUPPORT (Address family not  
supported by protocol) 
2. netstat -l -n  | grep 6000 
always gave empty output, so the X11 server was not listening as expected 
 
SOLUTION:  
If the kernel is configured to optionally support the IPv6 protocol 
via kernel module, this module (ipv6.o) MUST be loaded before starting the 
X11 server. Otherwise, X11 is seemingly unable to properly resolve  
hostnames and setup its sockets correctly. 
 
This bug report is therefore invalid and may be closed. 
Sorry for the inconvenience I might have caused. 
Comment 11 Benjamin Coles 2003-09-16 11:39:21 UTC
Closed bug per user request