【问题标题】:VSCode remote-containers.attachTorunningContainerFromViewlet errorVSCode remote-containers.attachTorunningContainerFromViewlet 错误
【发布时间】:2022-01-12 09:04:35
【问题描述】:

我正在使用 Remote-SSH 连接到远程,然后远程主机上的Attach Visual Studio Code 给了我一个错误。

[2022-01-12 16:59:07.497] [exthost] [error] Shell server terminated (code: 255, signal: null)
    enter code here
    ssh: Could not resolve hostname local-88-centos0-frp: No such host is known. 
     remote-containers.attachToRunningContainerFromViewlet {"value":"ms-vscode-remote.remote-containers","_lower":"ms-vscode-remote.remote-containers"}

【问题讨论】:

    标签: docker visual-studio-code containers


    【解决方案1】:

    当我尝试连接我们的实验室服务器时,我的计算机上也遇到了这个问题: 但是其他人的电脑在尝试连接远程容器时并没有弹出这个错误。

    Shell server terminated (code: 255, signal: null)
    
    ssh: connect to host xxx.xxx.xxx.xx port 22: Connection refused
    
    

    好的,我终于找到了解决方案,它可能是 vscode Remote - SSH 扩展上的一个错误。

    1. 点击扩展
    2. 点击Remote-SSH并右键设置
    3. find Remote.SSH:配置文件(自定义 SSH 配置文件的绝对文件路径。)
      请将此设置留空,它是 .ssh/config 中的默认设置,请在此处修改,但此处不要输入。

    然后我发现我的问题解决了......希望它可以帮助遇到和我一样问题的人。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-24
      • 2021-04-06
      • 2021-09-16
      • 2018-01-01
      相关资源
      最近更新 更多