Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio code 通过ssh到windows服务器的远程编辑_Visual Studio Code_Vscode Remote - Fatal编程技术网

Visual studio code 通过ssh到windows服务器的远程编辑

Visual studio code 通过ssh到windows服务器的远程编辑,visual-studio-code,vscode-remote,Visual Studio Code,Vscode Remote,plugin states VS Code Insiders对使用的Windows 10/Server 1803+提供了实验性支持 我已经在Windows server 2019 1809上安装并配置了官方OpenSSH服务器。我可以通过pubkey身份验证进行连接,并且PowerShell Core over ssh也可以正常工作。我尝试了远程SSH和远程SSH夜间插件。起初,它抱怨找不到bash。所以我安装了GitBash并将其添加到系统路径中。尝试连接到windows服务器时出现以下错误:

plugin states VS Code Insiders对使用的Windows 10/Server 1803+提供了实验性支持

我已经在Windows server 2019 1809上安装并配置了官方OpenSSH服务器。我可以通过pubkey身份验证进行连接,并且PowerShell Core over ssh也可以正常工作。我尝试了远程SSH和远程SSH夜间插件。起初,它抱怨找不到bash。所以我安装了GitBash并将其添加到系统路径中。尝试连接到windows服务器时出现以下错误:

[16:02:41.398] Log Level: 3
[16:02:41.399] remote-ssh-nightly@2019.12.24000
[16:02:41.399] darwin x64
[16:02:41.401] SSH Resolver called for "ssh-remote+myserver", attempt 1
[16:02:41.401] SSH Resolver called for host: myserver
[16:02:41.401] Setting up SSH remote "myserver"
[16:02:41.413] Using commit id "e74405d11443c5361c31e2bc341866d146eee206" and quality "insider" for server
[16:02:41.414] Testing ssh with ssh -V
[16:02:41.425] ssh exited with code: 0
[16:02:41.425] Got stderr from ssh: OpenSSH_7.9p1, LibreSSL 2.7.3
[16:02:41.430] Running script with connection command: ssh -T -D 51951 -o ConnectTimeout=15 myserver bash
[16:02:41.430] Install and start server if needed
[16:02:43.451] > 5122b1a5b835: running
> Unsupported architecture: MINGW64_NT-10.0-17763 x86_64
> 5122b1a5b835##27##
[16:02:43.452] Got some output, clearing connection timeout
[16:02:43.710] "install" terminal command done
[16:02:43.710] Install terminal quit with output: 5122b1a5b835##27##
[16:02:43.710] Received install output: 5122b1a5b835##27##
[16:02:43.710] Unsupported architecture
[16:02:43.711] Resolver error: The remote host's architecture is not supported
[16:02:43.714] ------


有人知道使用Windows 10/Server实现远程SSH的神奇秘诀吗?

看起来VSCode正在尝试在服务器上运行bash,我猜这将解析为git的bash,我记得它是基于mingw的。VSCode应在服务器上运行Powershell

您是否将服务器包括在扩展设置中的windows远程设备列表中?

需要“remote.SSH.windowslotes”设置。这是你的电话号码


“remote.SSH.windowslotes”:[“myserver”]

我没有windows远程设置。在您回复前几秒钟找到文章。谢谢