Re: how conflicting multiple local port forwardings should be solved

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




--- On Wed, 5/27/09, Ariel Burbaickij <ariel.burbaickij@xxxxxxxxx> wrote:

> I am using OpenSSH_5.0p1, OpenSSL 0.9.8h
> 
> and have following setup:
> 
> First local port forwarding example: 
> 
> ssh -L  7777:localhost:7777 some_user_name1@system1
> 
> Then the second user comes and sets up the section in
> following way:
> 
> ssh -L 7777:localhost:7777 some_user_name1@system2
> 
> He is successful in setting the second port forwarding
> session.
> 
> On attempt to connect to local port 7777 second user is
> forwarded to system1.
> 
> In my opinion the behaviour is wrong, the second attempt
> should not
> work (with some error message like
> ambiguous port forwarding) , let alone the forwarding to
> system1

I don't see how this could be any different.  The 1st connection builds a local port of 7777.  The 2nd connection attempts to build the same local port, but can not bind since the port is already in use.  At this point, the 2nd user (and any user for that matter) will always get the first/current local port 7777.

I just ran a test on a SSH-2.0-OpenSSH_4.6 client where I built a local port 10080, and in another window tried to build that same port.  I got an error:

channel_setup_fwd_listener: cannot listen to port: 10080
Could not request local forwarding.



      


[Index of Archives]     [Open SSH Unix Development]     [Fedora Users]     [Fedora Desktop]     [Yosemite Backpacking]     [KDE Users]     [Gnome Users]

  Powered by Linux