win 10 VS code Linux远程开发遇见的BUG

错误

win 10 VS code Linux远程开发遇见的BUG_第1张图片

[18:03:16.473] Log Level: 2
[18:03:16.480] [email protected]
[18:03:16.480] win32 x64
[18:03:16.483] SSH Resolver called for "ssh-remote+9.134.115.130", attempt 1
[18:03:16.484] SSH Resolver called for host: 9.134.115.130
[18:03:16.484] Setting up SSH remote "9.134.115.130"
[18:03:16.511] Using commit id "0ba0ca52957102ca3527cf479571617f0de6ed50" and quality "stable" for server
[18:03:16.512] Install and start server if needed
[18:03:20.246] getPlatformForHost was canceled
[18:03:20.247] Resolver error: Connecting was canceled
[18:03:20.250] ------

解决方案

如果出现这个错误,很大概率是vscode的setting.json文件配置有问题。参考了vscode远程连接错误解决方案后,基本只要在setting.json中加入这条语句就OK了,当然具体怎么加取决于ssh主机和本地主机的类型。以win10连接Linux为例:
“remote.SSH.remotePlatform”: {
“host-in-ssh-config-or-fqdn”: “Linux”
}
host-in-ssh-config-or-fqdn:为你在vscode上那个关于ssh的config.json中连接的主机命名
Linux:为目标主机的类型,我的是Linux,

错误原因

vscode的doc说是一些openssh低版本的错误,高版本不会有这个出错。所以意思应该如果你升级版本也许也能解决。

你可能感兴趣的:(ERR)