【发布时间】:2021-03-11 04:21:36
【问题描述】:
我在我的 Windows 10 桌面上连接到我公司的 VPN,并使用 VS Code 进行开发。我想使用 VS Code 远程开发,这样我就可以连接到我的远程公司开发服务器并直接在服务器上自动保存我的文件。我已经安装了 VS Code 远程开发包,这是我的 SSH 配置。
Host my.company.server
HostName 10.XXX.XXX.XX6
User root
IdentityFile C:\Users\My_User\Documents\Company\company_key.pem
但是,当将 VS Code 连接到远程服务器时,VS Code 显示我已连接但我收到以下错误并且无法查看远程目录。
Unable to write to Folder Settings because no resource is provided.
Could not fetch remote environment.
Failed to connect to the remote extension host server
(Error: Websocket close with status code 1006)
我尝试使用 WinSCP 连接到远程服务器,效果很好。我还使用 PowerShell 使用以下命令登录,效果也很好。
ssh -i C:\Users\My_User\Documents\Company\company_key.pem root@10.XXX.XXX.XX6
我在这里做错了什么?任何 VS Code 大师都可以帮助我解决这个问题吗?谢谢。
【问题讨论】:
标签: visual-studio-code vscode-settings vscode-remote