Bug#360151: ssh: port forwarding does not work using connection sharing when not master
Package: ssh
Version: 1:4.2p1-7
Severity: normal
I have this in my .ssh/config:
Host *
ControlMaster auto
ControlPath /home/oku/.ssh/%r@%h:%p
This works fine, except when I want to use port forwarding using eg.
ssh -C -L 8080:127.0.0.1:80 remotehost
when this is not the first connection to remotehost. The local port is not listening:
oku@nimrod:~$ netstat -ln|grep 8080
oku@nimrod:~$
However, after terminating all ssh sessions, including the master, and try again, so
that this time the port forwarding sessions becomes the master, it works fine:
oku@nimrod:~$ netstat -ln|grep 8080
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN
tcp6 0 0 ::1:8080 :::* LISTEN
oku@nimrod:~$
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages ssh depends on:
ii openssh-client 1:4.2p1-7 Secure shell client, an rlogin/rsh
ii openssh-server 1:4.2p1-7 Secure shell server, an rshd repla
ssh recommends no packages.
-- debconf information:
ssh/insecure_rshd:
ssh/ssh2_keys_merged:
ssh/user_environment_tell:
* ssh/forward_warning:
ssh/insecure_telnetd:
ssh/new_config: true
* ssh/use_old_init_script: true
ssh/protocol2_only: true
ssh/encrypted_host_key_but_no_keygen:
ssh/run_sshd: true
ssh/SUID_client: true
* ssh/disable_cr_auth: false
Reply to: