Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add localforward example #130

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

XSAM
Copy link

@XSAM XSAM commented Nov 15, 2019

I want to implement an SSH server to forward a remote server's port to local (aka local forward), then I found an example called remoteforward, and it uses LocalPortForwardingCallback setting.

When I try to use the example to bind local port and use curl to request,

ssh -L 0.0.0.0:8080:example.com:80 localhost -p 2222
curl localhost:8080

Got error

channel 2: open failed: unknown channel type: unsupported channel type

Then I found it cannot be used in local forward, and the LocalPortForwardingCallback in this example kinda useless and bring some confuse.

So I remove the LocalPortForwardingCallback in remoteforward example and add a new example called localforward

@dcb9
Copy link

dcb9 commented Apr 19, 2023

@XSAM Thanks! Helped me a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants