首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >VScode远程连接错误:进程试图写入不存在的管道

VScode远程连接错误:进程试图写入不存在的管道
EN

Stack Overflow用户
提问于 2020-02-21 16:51:33
回答 19查看 83.1K关注 0票数 71

我使用vscode和remote-ssh来连接我的服务器,在配置之后,我想连接我的主机,但它失败了,对话框显示:“无法建立到XX的连接,进程试图写入不存在的管道。”

输出:

代码语言:javascript
复制
[16:45:20.916] Log Level: 3
[16:45:20.936] remote-ssh@0.49.0
[16:45:20.936] win32 x64
[16:45:20.944] SSH Resolver called for "ssh-remote+aliyun", attempt 1
[16:45:20.945] SSH Resolver called for host: aliyun
[16:45:20.945] Setting up SSH remote "aliyun"
[16:45:21.012] Using commit id "c47d83b293181d9be64f27ff093689e8e7aed054" and quality "stable" for server
[16:45:21.014] Install and start server if needed
[16:45:21.019] Checking ssh with "ssh -V"
[16:45:21.144] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:45:21.214] Running script with connection command: ssh -T -D 5023 aliyun bash
[16:45:21.221] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[16:45:21.504] > 
> 
>
> ]0;C:\WINDOWS\System32\cmd.exe
[16:45:21.505] Got some output, clearing connection timeout
[16:45:21.577] > 
> 
>
> 
[16:45:21.592] > Bad owner or permissions on C:\\Users\\DY/.ssh/config
> 
[16:45:21.689] > The process tried to write to a nonexistent pipe.
> 
[16:45:22.091] "install" terminal command done
[16:45:22.092] Install terminal quit with output: The process tried to write to a nonexistent pipe.
[16:45:22.093] Received install output: The process tried to write to a nonexistent pipe.
[16:45:22.096] Resolver error: The process tried to write to a nonexistent pipe
[16:45:22.107] ------
EN

回答 19

Stack Overflow用户

回答已采纳

发布于 2020-02-21 17:53:04

将绝对文件路径添加到自定义SSH配置文件(C:\Users{用户名}..。

ssh\config),我的问题就解决了。​

票数 87
EN

Stack Overflow用户

发布于 2020-10-18 12:28:34

如果格式化/重新安装服务器操作系统,但使用与以前相同的IP,则可能会遇到指纹不匹配的情况。

您可能需要删除此文件中的旧指纹: C:\Users\xxx.ssh\known_主机

和文件中的旧IP : C:\Users\xxx.ssh\config

然后再次尝试添加主机。

票数 37
EN

Stack Overflow用户

发布于 2020-11-29 19:03:27

对我有用的是:

  1. 删除ssh配置文件夹,这两个文件夹都在C:\Program Data\sshC:\\.ssh
  2. 在VS Code中,按F1,选择Remote-SSH: Connect to Host...
  3. 不要在提示符中输入任何内容,而是选择+ Add New SSH Host..
  4. 输入完整的ssh命令,包括密钥(对于Windows,您可能需要用双引号将路径括起来)ssh -i "C:\path\to\key" user@host..。(您需要确保密钥具有有限的权限。删除所有继承的权限,并仅将完全控制权授予所有者。)
  5. 系统将要求您选择将在其中创建新配置文件的文件夹。选择两个选项中的任何一个。
  6. 将出现一个提示,通知已创建新的配置文件。点击connect
票数 8
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60335069

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档