vscode 无法 ssh 连接“进程试图写入不存在的管道" [英] vscode cant ssh connect "The process tried to write to a nonexistent pipe"
问题描述
当我运行命令时,我能够在我的 Windows 10 计算机上使用 ubuntu 子系统 ssh:
I am able to ssh on my windows 10 computer using ubuntu subsystem when I run the command:
/mnt/c/Users/marti/Downloads$ sudo ssh -i credfile.pem ec2-user@3.333.33.333
我的文件位于 /mnt/c/Users/marti/Downloads/credfile.pem
我正在尝试让 VSCode 的 ssh 扩展工作,但它一直失败并出现错误进程试图写入不存在的管道"
I am trying to get VSCode's ssh extension to work but it keeps failing with an error "The process tried to write to a nonexistent pipe"
在我的 vscode 设置中,它指向我的 ssh 配置文件:
In my vscode settings it points to my ssh config file:
为了连接,我点击我的 vscode 窗口的绿色左下角并选择第一个选项remote-ssh 将当前窗口连接到主机"
In order to connect I click the green bottom left corner of my vscode window and select the first option 'remote-ssh connect current window to host'
我粘贴我的命令,按回车键,它提示我选择 mac/win/linux,然后我选择 linux.
I paste in my command, hit enter, it prompts me to choose either mac/win/linux and I pick linux.
但是它会导致一个错误,说它试图写入一个不存在的管道?
But it then just leads to an error saying it tried to write to a nonexistent pipe?
[20:50:27.876] "install" terminal command done
[20:50:27.877] Install terminal quit with output: The process tried to write to a nonexistent pipe.
[20:50:27.877] Received install output: The process tried to write to a nonexistent pipe.
[20:50:27.883] Resolver error: Error: The process tried to write to a nonexistent pipe
还有什么我需要设置或更改才能让我的 vscode ssh 连接工作吗?
Is there something else I need to setup or change for my vscode ssh connection to work?
推荐答案
您应该在 .ssh/config
文件中编写相同的命令,而不是粘贴您的命令.
添加进去:
Instead of pasting your command, you should code the same command in your .ssh/config
file.
Add in it:
Host ec2
Hostname 3.333.33.333
User ec2-user
IdentityFile C:\path\to\credfile.pem
然后您将可以在选择remote-ssh connect current window to host
"后选择条目ec2
"
Then you will be able to select the entry 'ec2
' after selecting 'remote-ssh connect current window to host
'
这篇关于vscode 无法 ssh 连接“进程试图写入不存在的管道"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!