问题
I've set up my VSCode Insider to connect th a Windows 2019 Server via the Remote-SSH extension. Is it correct, that I need a WSL installed so that it can set up the VSCode-Server and then it is running within the WSL distro when I'm connected?
I thought it would run on Windows instead.
回答1:
The stable VS Code 1.40 release does not support for Windows ssh hosts: https://code.visualstudio.com/docs/remote/ssh#_remote-ssh-limitations
This feature is still experimental and only enabled in VS Code insiders builds when you set "remote.SSH.remoteIsWindows": true
(Make sure to use the nightly ssh extension too) See this issue for details
回答2:
You do not need to run WSL. You need to install a ssh client on your local machine (the machine that you will run VS Code), and install a ssh server on your remote machine. That's all you need. Your local VS Code uses the ssh client to connect to that ssh server on the remote machine. Details of how to do this can be found here, including opening firewall ports in the case of Windows.
来源:https://stackoverflow.com/questions/58802685/visual-studio-code-remote-ssh-connect-to-windows-server-2019