-
Notifications
You must be signed in to change notification settings - Fork 302
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
Windows Server Support #25
Comments
That's planned, and mentioned near the top of the docs: https://code.visualstudio.com/docs/remote/ssh#_connect-to-a-remote-host but can you explain what you mean about our auth documentation not being helpful? |
The Linux Server only support isn't mentioned in the announcement blog entry at all (https://code.visualstudio.com/blogs/2019/05/02/remote-development). On the extension's page (https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh), it is only a small note which may escape others just like it did me. I'm just suggesting maybe add a bit more prominence to it. It's especially befuddling considering Code is a Microsoft product. As for auth documentation, I was actually referring to MS's documentation on how to set up OpenSSH (https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse) with public key auth instead of a password. Luckily many others had the same problem and got together to figure it out (PowerShell/Win32-OpenSSH#1306). Adidtionally I had created authorized_keys in Code. OpenSSH expects Windows line endings and Code was set up for Linux. Fun! 😆 |
Thanks for explaining. Sorry you lost some time. It's on the way! |
@r3volution11 @roblourens Yes, there's also a C:\ProgramData\ssh\administrator_authorized_keys you need to add your key to if your an administrator. We'll add a similar summary to the ones for other operating systems to docs once we support it. |
@Chuxel Well funny enough, apparently I don't need that. I went back and forth during my troubleshooting to see if that was (part of) the problem. I have it currently commented out and it's working just fine. Setting up a SSH server on Windows is a lot trickier than it should be. 😅 |
@roblourens To piggy back on @r3volution11's comment, there is no mention of the SSH host Linux restriction on the remote development extension page (https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack), and it is only mentioned in passing in the third paragraph of the remote - ssh extension page (https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh). The only page it is highlighted on at all is in the docs (https://code.visualstudio.com/docs/remote/ssh#_getting-started) but even then it's not mentioned until after the introduction and installation instructions. It's great to hear you all are working on Windows SSH hosting support (and hopefully macOS too!), but in the meantime, can you update the extension description and docs to call out the Linux restriction much more clearly and early than you have currently? It would save people like me the time of installing and configuring Code - Insiders and the extensions only to realize after the fact that they can't set up the SSH host they were expecting to be able to :). |
Dropping this error message as a comment here for other's (I had trouble finding this thread) ...in case someone else is trying to SSH into a Windows machine with VS Code Remote SSH (I can SSH fine via the my mac terminal into my Windows 10 machine fine without the extensions) Ran into the same issue the OP
|
Is there any time frame for this feature? I've found only #916 but nothing more forward looking. |
I have the following work-around for Visual C++, but should work analogously for other setups:
Bottom line: This is an insane and utterly horrible hack that I've probably wasted too much time on for likely never using it (although I would appreciate a proper solution as I do not want to use a crappy [sorry] Windows for developing). But maybe someone wants to expand on it or use really use it. |
looks good. 2020.1.31489 works for me now. thanks! |
Detected Windows and Linux automatically 👍. |
Even with my default shell set to
This is using VS Code Insiders:
When I SSH into the server directly, I can confirm that the default shell has been explicitly set to
If there is any other debugging information I can give you, please do not hesitate to ask. I'd really like to be able to support VSCode remoting into these windows machines! |
@staticfloat it looks like you have not followed the step to set this setting |
With that setting enabled, I get even less information:
(Note that I've changed the hostname, but the deployment is identical) |
Uh, no clue. Are you sure that something like |
No, it doesn't. I get
This leads me to believe that the issue is that |
That's interesting... I don't have any of those reg keys set. My output looks different. Here is the only section where cmd.exe appears, and nothing else looks useful:
The sshd openssh version is 7.7 |
Did you install your OpenSSH from https://github.com/PowerShell/Win32-OpenSSH/releases ? |
No, it came with windows 10 |
Looks like the built-in Windows 10 version is a few releases behind then from the latest release, v8.1.0.0p1-Beta. Most likely it is in 20H1 if any Windows Insiders want to check. v7.9.0.0p1-Beta introduced these changes that likely is causing the issue:
|
It certainly is!
Correct, see PowerShell/Win32-OpenSSH#1263 (comment)
|
I will try to get that set up on a machine to test but if that simple command above doesn't work, could you please open an issue on the windows ssh repo for it? |
I can confirm that backing down to the |
Just wanted to tag @bagajjal & @manojampalam on the Windows OpenSSH side in case you need to talk to one of them. |
Also, for anyone else here that loves their @echo off
if defined SSH_CLIENT (
:: check if we've got a terminal hooked up; if not, don't run bash.exe
C:\cygwin\bin\bash.exe -c "if [ -t 1 ]; then exit 1; fi"
if errorlevel 1 (
C:\cygwin\bin\bash.exe --login
exit
)
) This is known to work with Cygwin bash, unsure about bash that ships with windows; I imagine it's very sensitive to how the TTY code works internally. This way, launching |
Using older SSH versions works, but it's quite unsatisfying because these older versions don't work nearly as well for the interactive use case. Were you able to reproduce the issue with the newer SSH versions/any idea where the problem is? |
Hey, thanks for all your work on this feature. One small thing that might impact release for some users: I noticed that the method of running the initial script was to call powershell.exe with an encoded command. Is there any different way or any way I can manually run this procedure to get the server up on my Windows machine? It turns out that Cisco AMP flags the encoded command as a malware technique and it then appears to kill the process. |
@ewired that's unfortunate, it's hard for me to avoid. Do you know of any way to configure Cisco AMP to not do that? I guess I will have to wait and see how common this is. |
With the next release, we will allow using windows remotes with stable vscode 😁 |
I can confirm same as @staticfloat. If I try 8 or 8.1 beta on the server I get |
After spending a few hours getting OpenSSH to work with pubkey authentication (Microsoft's guide is 💩), I was excited to finally give this a shot. Then I get the error that only Linux or WSL servers are supported.
So it'd be great for that support to be added.
But in the meantime please try pointing out, in a bigger and much easier to find notification, that Windows isn't supported yet in this manner.
Thanks!
The text was updated successfully, but these errors were encountered: