Git Product home page Git Product logo

Comments (4)

strazto avatar strazto commented on September 25, 2024

Does this problem occur when not using sshportal?

(To clarify the purpose of asking, I'm wondering if it's possible this problem is related to something else, eg, that port already being bound by something)

from sshportal.

xentac avatar xentac commented on September 25, 2024

I can verify that sshportal causes the failure in remote port forwarding. Connecting directly to the system allows remote port forwarding whereas connecting through sshportal results in a failed forward.

from sshportal.

badrbouslikhin avatar badrbouslikhin commented on September 25, 2024

I have the same issue. Did you find the cause?

from sshportal.

EBADBEEF avatar EBADBEEF commented on September 25, 2024

I think I was able to trace this down into gliderlabs/ssh/server.go handleRequests(), there is no handler registered on the connection. By default we only register a ChannelHandler not a RequestHandler in server.go server() ssh.Server() (boy I learned a lot about ssh today).

func (srv *Server) handleRequests(ctx Context, in <-chan *gossh.Request) {
  for req := range in {
    handler := srv.RequestHandlers[req.Type]
    if handler == nil {
      fmt.Printf("USING DEFAULT HANDLER for %s\n", req.Type)
      handler = srv.RequestHandlers["default"]
    }
    if handler == nil {
      fmt.Printf("DEFAULT HANDLER EMPTY\n")
      req.Reply(false, nil)
      continue
    }
    /*reqCtx, cancel := context.WithCancel(ctx)
    defer cancel() */
    ret, payload := handler(ctx, srv, req)
    req.Reply(ret, payload)
  }
}

I get the following printout:

USING DEFAULT HANDLER for tcpip-forward
DEFAULT HANDLER EMPTY

"tcpip-forward" is the "global request" for remote port forwards (https://www.rfc-editor.org/rfc/rfc4254#section-7.1)

from sshportal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.