X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.4 required=5.0	tests=AWL,BAYES_20,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Oleksandr Gavenko <gavenko@bifit.com.ua>
Subject: Can not make port forwarding from Cygwin when ControlMaster/ControlPath used.
Date: Mon, 13 Feb 2012 11:18:07 +0200
Lines: 41
Message-ID: <84r4xzw0q8.fsf@bifit.com.ua>
Mime-Version: 1.0
Content-Type: text/plain
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.91 (windows-nt)
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com


I can forward port from Cygwin to Debian:

  cygwin# nc -l -p 6000

  debian1# ssh -L 7000:cygwin.host:6000 user@cygwin.host

  debian2# telnet localhost 7000

But if do same in inverse direction I got:

  debian# nc -l -p 6000

  cygwin1# ssh -L 8000:debian.host:6000 user@debian.host

  bind: Address already in use
  channel_setup_fwd_listener: cannot listen to port: 8000
  Could not request local forwarding.

I don't understand what this mean...

netstat under Cygwin is Windows utility:

  debian# netstat -l -n | grep 6000
  tcp        0      0 0.0.0.0:6000            0.0.0.0:*               LISTEN

  cygwin2#  netstat -n -a -n

  TCP    127.0.0.1:8000         0.0.0.0:0              LISTENING       2308
  [ssh.exe]

Note that ssh.exe is not "ssh -L" but that I run to connect to debian.host for
"nc -l -p 6000".

To resolve issue I comment this line in ~/.ssh/config:

  # ControlPath ~/.ssh/sock_%r@%h_%p
  # ControlMaster auto

-- 
Best regards!


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

