bugzilla-daemon at mindrot.org
2013-Dec-11  15:36 UTC
[Bug 2183] New: ssh -g has no effect if master socket already open
https://bugzilla.mindrot.org/show_bug.cgi?id=2183
            Bug ID: 2183
           Summary: ssh -g has no effect if master socket already open
           Product: Portable OpenSSH
           Version: 6.4p1
          Hardware: amd64
                OS: Linux
            Status: NEW
          Severity: minor
          Priority: P5
         Component: ssh
          Assignee: unassigned-bugs at mindrot.org
          Reporter: imwellcushtymelike at gmail.com
>From the man page:
?-g      Allows remote hosts to connect to local forwarded ports.
When working with a control socket, this works fine if -g is included
with the initial connect attempt, for example:
$ cat ~/.ssh/config
Host *
ControlMaster        auto
ControlPath        ~/.ssh/%r@%h:%p
$ ssh -gTfNL 12345:localhost:12345 host
$ netstat -tln
tcp        0      0 0.0.0.0:12345             0.0.0.0:*              
LISTEN      -
$ lsof -n
ssh       182446        user    3u     IPv4           76397177      
0t0      TCP 192.168.0.9:51181->192.168.0.15:ssh (ESTABLISHED)
ssh       182446        user    4u     IPv4           76397181      
0t0      TCP *:3128 (LISTEN)
ssh       182446        user    5u     IPv6           76397182      
0t0      TCP *:3128 (LISTEN)
and similarly:
$ ssh -g host
user at host:~$ exit
$ ssh -gTfNL 12345:localhost:12345 host
$ netstat -tln
tcp        0      0 0.0.0.0:12345             0.0.0.0:*              
LISTEN      -
However, if it isn't then -g is ignored on subsequent attempts to
forward ports:
$ ssh host
user at host:~$ exit
$ ssh -g -L 12345:localhost:12345 host
$ netstat -tln
tcp        0      0 127.0.0.1:12345             0.0.0.0:*              
LISTEN      -
$ lsof -n
ssh       182399        user    3u     IPv4           76390396      
0t0      TCP 192.168.0.9:51178->192.168.0.15:ssh (ESTABLISHED)
ssh       182399        user    4u     unix 0x0000000000000000      
0t0 76390976 /home/user/.ssh/user at host
ssh       182399        user    6u     IPv6           76392394      
0t0      TCP [::1]:3128 (LISTEN)
ssh       182399        user    7u     IPv4           76392395      
0t0      TCP 127.0.0.1:3128 (LISTEN)
This doesn't really make sense: ssh should still be capable of binding
to the correct address as requested.
From:
https://bugs.launchpad.net/debian/+source/openssh/+bug/1259939
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731950
-- 
You are receiving this mail because:
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2014-Jul-03  05:39 UTC
[Bug 2183] ssh -g has no effect if master socket already open
https://bugzilla.mindrot.org/show_bug.cgi?id=2183
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED
                 CC|                            |djm at mindrot.org
             Blocks|                            |2226
--- Comment #1 from Damien Miller <djm at mindrot.org> ---
I've committed a manual fix to explain that -g must be applied to the
multiplex master. This mirrors other settings that are decided at
master connection time, like ForwardAgent and ForwardX11.
-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.
bugzilla-daemon at mindrot.org
2014-Oct-07  21:00 UTC
[Bug 2183] ssh -g has no effect if master socket already open
https://bugzilla.mindrot.org/show_bug.cgi?id=2183
Damien Miller <djm at mindrot.org> changed:
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |CLOSED
--- Comment #2 from Damien Miller <djm at mindrot.org> ---
Close all bugs left open from 6.6 and 6.7 releases.
-- 
You are receiving this mail because:
You are watching someone on the CC list of the bug.
You are watching the assignee of the bug.