X forwarding: trying to forward to busy local port

Darren Tucker dtucker at zip.com.au
Mon Feb 5 23:34:55 EST 2007


On Mon, Feb 05, 2007 at 12:47:11PM +0100, Lars Kruse wrote:
> Hi to all of you,
> 
> maybe my previous mail
> (http://permalink.gmane.org/gmane.network.openssh.devel/13345) was not
> clear enough, so I will try to summarize it more concisely:

I missed the original post but just went and reviewed it.

> If I use X-Frowarding, then the ssh-daemon offers DISPLAY settings,
> that can not be used. Thus resulting in "cannot connect ..." errors.
> 
> >From my point of view, the ssh-daemon should check, if (for example)
> port 6014 is available before it offers the DISPLAY "localhost:4".
> 
> This not-checking is especially ugly, as the ssh-daemon itself occupied
> the respective port during another X-Forwarding session.

It does check that it can bind to the port, though (see
x11_create_display_inet()).

I suspect the root of your problem is some funkiness with IPv6.  Note
that some of the listening sockets in your original post are listening
on ::1 and some on 127.0.0.1.

Do you have X11UseLocalhost set in sshd_config?  If so, what does
"localhost" resolve to?

If you can afford to do so you could try running without the ipv6
stack loaded.

-- 
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4  37C9 C982 80C7 8FF4 FA69
    Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.


More information about the openssh-unix-dev mailing list