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

Support ssh client tunneling natively #26

Open
chipsenkbeil opened this issue Aug 16, 2021 · 4 comments
Open

Support ssh client tunneling natively #26

chipsenkbeil opened this issue Aug 16, 2021 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@chipsenkbeil
Copy link
Owner

Via something like channel_direct_tcpip, avoid the need for other ports to be allocated by launching a program directly via the ssh library and then tunneling to it through SSH.

In terms of async support, it seems that the existing libraries have been removed as recommendations as described here: alexcrichton/ssh2-rs#224

We'd need to build something simple like threaded message passing to send/receive data. From reading the documentation, we can set it to be nonblocking. Sessions need to avoid concurrent access, so we'd want both reads and writes to exist in a singular thread that uses message passing to pass data around.

@chipsenkbeil chipsenkbeil added the enhancement New feature or request label Aug 16, 2021
@chipsenkbeil chipsenkbeil added this to the Backlog milestone Aug 16, 2021
@wez
Copy link

wez commented Aug 16, 2021

You may be able to leverage: https://github.com/wez/wezterm/tree/main/wezterm-ssh which presents an easier to use async interface than the raw libssh2 which it uses under the covers.

I've been thinking about also enabling the use of libssh in that crate which has support for more keys and more functions and that, importantly, has overlap with the configuration we use at work than does libssh2.

@chipsenkbeil
Copy link
Owner Author

chipsenkbeil commented Aug 16, 2021 via email

@chipsenkbeil chipsenkbeil modified the milestones: Backlog, 1.0 Aug 28, 2021
@chipsenkbeil
Copy link
Owner Author

chipsenkbeil commented Sep 3, 2021

You may be able to leverage: https://github.com/wez/wezterm/tree/main/wezterm-ssh which presents an easier to use async interface than the raw libssh2 which it uses under the covers.

I've been thinking about also enabling the use of libssh in that crate which has support for more keys and more functions and that, importantly, has overlap with the configuration we use at work than does libssh2.

@wez

Having looked at wezterm-ssh, I think I'm going to need the full ssh client lib instead to support both ssh native tunneling and running distant as an ssh client for file and proc manipulation (using an sftp channel, etc) .

Are there any specific details I should know or consider for work? If so, feel free to share privately when you have a chance :)

@chipsenkbeil chipsenkbeil modified the milestones: 1.0, Backlog Oct 8, 2021
@chipsenkbeil
Copy link
Owner Author

Moving to backlog. This requires adding the functionality to wezterm-ssh, which I don't have the time to do and isn't critical. Marking as help wanted in case someone else wants to tackle this.

@chipsenkbeil chipsenkbeil added the help wanted Extra attention is needed label Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants