-
Notifications
You must be signed in to change notification settings - Fork 39
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
Unable to establish connection on Windows 11 #46
Comments
This crate is basically UNIX-only, since it relies on the OpenSSH toolchain, which is primarily a UNIX tool. It is possible to get it working with Windows, but it's not something we've been focused on. If you want to take on trying to fix it up for Windows though I'd be happy to look at a PR! |
Also microsoft/vscode-remote-release#96 for control master on windows |
@inf0rm4tik3r You can compile and run this crate in WSL (Windows Subsystem for Linux), it will work just fine. |
I think we can modify the |
Oof, them not supporting a control master is pretty unfortunate. But yes, I agree, we could support Windows by having it just have each ssh command connect separately, though this would need to be very well documented. |
#61 is closed due to adding too much complexity, forcing user to depend on @jonhoo Perhaps we can support windows by creating a separate crate for it, that server as a simple wrapper for launching This would make the code more maintainable than merging it into this crate and also make it clearer to the user, and then maybe we can find a way to test it in the CI. |
Oh, yeah, that'd be nice! |
I've implementing it in openssh-rust/openssh-generic, would take quite some time though. |
What does this mean? I am a new user of this crate. Does this mean that I should be using Also, does pushing for |
Yes, it native-mux provides better errors, better performance and less memory usage.
No, the process-mux implementation does not work on Windows. In this crate, we use ssh multiplexing feature of openssh, which unfortunately does not work on windows due to its support of Unix Socket being incomplete. I am working on another crate openssh-generic, which does not use multiplexing and should work on all platforms. The downside however, is longer startup time and it uses more resource. |
I am planning on supporting windows in |
Using version 0.8.1, creating a connection does not seem to work when on Winodws 11.
When executing the following line of code:
let session = Session::connect(format!("root@{}", SERVER_IP.to_string()), KnownHosts::Accept).await?;
I either get the following output, no folder in root of my project and the process terminates:
Error: Connect(Custom { kind: ConnectionAborted, error: "getsockname failed: Bad file descriptor\r\nssh_dispatch_run_fatal: Connection to UNKNOWN port -1: unexpected internal error" })
Or I do not get any output and the process "hangs" at this line.
The library then created a folder in the root of my project named ".ssh-connection***" before waiting indefinitely.
The text was updated successfully, but these errors were encountered: