-
Notifications
You must be signed in to change notification settings - Fork 304
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
Use WSL/bash ssh instead of openSSH #359
Comments
We don't support using WSL SSH yet but I will keep this as a feature request for that. |
@thkrishn If you have WSL, then I assume you also have Windows 10. As long as you're running 1709 or later then you should be able to follow these instructions to install the OpenSSH optional feature. You can then use the |
@thkrishn WSL is also an emulation layer, so you perf may not be as good as using the native libraries. |
@pd93 and @Chuxel Thanks EDIT: https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse |
@thkrishn OpenSSH is definitely available in 1709. I couldn't find the official release notes for it, but there are plenty of articles that reference its use in 1709. Plus the Microsoft blog post I already linked. The documentation you linked is for Windows Server and only states that OpenSSH is present in Windows 10 1809, not that it wasn't present before that. The reason it uses 1809 as the example is because (until a few days ago) it was the latest release of Windows 10. -- edit -- As an aside, I thoroughly recommend an upgrade! 😉 The WSL and Windows 10 itself have vastly improved since 2016. |
The problem with using OpenSSH is that you have to support two SSH client configurations — OpenSSH and ssh in the WSL. |
@Sumanai Agreed. If you have requirement to use the WSL and Remote SSH then there is a config duplication problem. Much the same as the issue of two |
Related to #448 which has been implemented. 🎉 |
I think this feature would be important, e.g. it's difficult if not impossible to use kerberos with Windows' ssh. If you have admin access, you may compile and put the file under C:\Windows\System32\OpenSSH\ssh.exe as a workaround. // SPDX-License-Identifier: WTFPL
#include <sstream>
#include <cstdlib>
int main(int argc, char** argv)
{
std::stringstream builder;
builder << "C:\\Windows\\Sysnative\\bash.exe -ic \"ssh ";
for (int i = 1; i < argc; i++) {
if (i != 1) builder << ' ';
builder << "\\\"";
for (char* v = argv[i]; *v; v++) {
switch (*v) {
case '&': builder << "^&"; break;
default: builder << *v; break;
}
}
builder << "\\\"";
}
builder << '"';
return system(builder.str().c_str());
} |
Is it possible to use Git for Windows instead of Windows OpenSSH Client on Windows 10 machine? Our company machine doesn't have option to install Windows OpenSSH Client. I have got Git for Windows installed, but looks like VS Code is hard-coded to use OpenSSH Client under Windows 10. Is it possible to add a config to override the default ssh path? |
@jemerald This is available in insiders and the SSH nightly extension. You can set |
I was trying to set this up :
https://code.visualstudio.com/docs/remote/ssh#_getting-started
but Open ssh is not there on mu windows build; so is it possible to force vscode insiders to use WSL ssh (linux ssh)
Thanks
The text was updated successfully, but these errors were encountered: