X forwarding: trying to forward to busy local port

Lars Kruse kruse at silicann.com
Tue Feb 13 21:49:12 EST 2007


Hi to all of you,

I would like to summarize the current state of the problem as described
in http://permalink.gmane.org/gmane.network.openssh.devel/13345.

If the openssh server is running in ipv4/ipv6 mode ("AddressFamily
Any"), then pseudo-random "unable-to-connect-to-display" errors occour
for clients connecting via ssh for X-forwarded remote sessions.

For now the only workaround would be, to disable ipv6 support for
openssh daemons used for X-forwarding.

From my point of view, there are two ways to solve the root of this
problem:

1) improved "is this port usable on all interfaces?"-detection
ipv4/ipv6 mixed openssh daemons should behave like pure ipv4 daemons:
unusable DISPLAY settings may never be offered to clients


2) avoid to randomly allocate critical ports
the openssh daemon may never allocate ports for running X-sessions which
are in the range, that is used for new X-forwarding connections (maybe
6000..6100).


From my point of view, this issue is a highly irritating one, as it is
very hard to track down the source of this seemingly random
"unable-to-connect-to-display" problem. If the previously described
short-term-workaround would not be available, then our current
X-session-setup would have to be replaced by a more reliable, but less
preferable solution. 
So I am very glad, that you helped me to find this workaround ...

But how can this issue be solved without loosing ipv6 compatibility?

thanks and regards,
Lars


More information about the openssh-unix-dev mailing list