Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-792

Remote Port-Forwarding uses invalid "original host" values

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.6.0
    • 2.2.0
    • Java 8
      OSX

    Description

      When starting a server which accepts all kinds of port forwarding:

      sshd.setTcpipForwardingFilter(new StaticDecisionForwardingFilter(true));

      remote port-forwarding doesn't work (at least when connecting from OSX) unless a specific address is given:
      ssh localhost p 2222 -R10001:localhost:80 < doesn't work
      ssh localhost p 2222 -R127.0.0.1:10001:localhost:80 < does work

      As far as I can tell, TcpipClientChannel.java:98 uses the underlying socket-address
      of the effective connection and transmit the host (which is either 127.0.0.1 or ::1) on OSX.

      However, the client (ssh) would want to see "localhost" as original host in order to permit tunneling.

      Is there anything I am missing? Otherwise I could provide a PR which fixes this (by remembering the originally requested host and reporting that back).

      Attachments

        1. Forwarder.java
          1 kB
          Andreas Haufler

        Activity

          People

            lgoldstein Lyor Goldstein
            andyHa Andreas Haufler
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: