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

Feature Request: Implement Cancel Socket/Port Forwarding #110

Open
benlcb opened this issue Jan 4, 2023 · 2 comments
Open

Feature Request: Implement Cancel Socket/Port Forwarding #110

benlcb opened this issue Jan 4, 2023 · 2 comments

Comments

@benlcb
Copy link

benlcb commented Jan 4, 2023

The Session::request_port_forwarding documentation states the following:

Currently, there is no way of stopping a port forwarding due to the fact that openssh multiplex server/master does not support this.

In ssh, you can cancel port forwarding for multiplexed connections like this:

ssh -S [path_to_multiplexing_socket] -O cancel -L/R [forwarding_addresses] 

So I don't see why this couldn't be implemented?
Maybe I'm missing something. Will implement it myself if no one picks up the ticket or tells me why it won't work. :)

@NobodyXu
Copy link
Member

NobodyXu commented Jan 5, 2023

I didn't support this mainly because the ssh mux doc told me so:

Note: currently unimplemented (server will always reply with MUX_S_FAILURE).

Perhaps the doc is out of date and it's actually supported.

Maybe I'm missing something. Will implement it myself if no one picks up the ticket or tells me why it won't work. :)

I will appreciate that!
Please do submit a PR since openssh-mux-client is now in the development stage of a new crate openssh-proxy-client that is blocking on tokio-util and I'm been quite busy recently.

@benlcb
Copy link
Author

benlcb commented Jan 8, 2023

Oh I see! I think that comment in the doc you linked is outdated, I implemented it locally for me and it seems to work.
I'll explicitly confirm that it works & figure out what my employers open source policy is, then I'll create a PR!

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

No branches or pull requests

2 participants