VScode远程连接服务器-解决“过程试图写⼊的管道不存在“报错
最开始是打算使⽤pycharm连接服务器的, 但是只有Pro版⽀持远程连接功能, 我的是Community版本, 重新安装太⿇烦了, 遂改⽤VScode.
Running script with connection command: ssh -T -D 1366 lab bash
[21:47:14.703] Terminal shell path: C:\WINDOWS\
[21:47:15.002] > ]0;C:\WINDOWS\
[21:47:15.003] Got some output, clearing connection timeout
[21:47:15.030] > Bad owner or permissions on C:\\Users\\\346\273\221\347\250\275\346\200\252/.ssh/config
> 过程试图写⼊的管道不存在。
>
>
>
>
>
pycharm community>
>
>
>
>
>
>
[21:47:16.339]"install" terminal command done
[21:47:16.340] Install terminal quit with output: 过程试图写⼊的管道不存在。
[21:47:16.340] Received install output: 过程试图写⼊的管道不存在。
[21:47:16.342] Failed to parse remote port from server output
[21:47:16.343] Resolver error: Error:
at Function.Create (c:\Users\滑稽怪\.vscode\-ssh-0.66.1\out\extension.js:1:429193)
handleInstallOutput (c:\Users\滑稽怪\.vscode\-ssh-0.66.1\out\extension.js:1:427836)
Install (c:\Users\滑稽怪\.vscode\-ssh-0.66.1\out\extension.js:1:521703)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async c:\Users\滑稽怪\.vscode\-ssh-0.66.1\out\extension.js:1:485356
at withShowDetailsEvent (c:\Users\滑稽怪\.vscode\-ssh-0.66.1\out\extension.js:1:488706)
at solve (c:\Users\滑稽怪\.vscode\-ssh-0.66.1\out\extension.js:1:486435)
at async c:\Users\滑稽怪\.vscode\-ssh-0.66.1\out\extension.js:1:560057
然后搜了很多解决办法:
1. ⾸先检查是否安装openssh, 我检查后确认是已经安装了的
2. 尝试了多种⽅法, 最后通过修改openssh依赖为git bash ssh依赖, 成功解决.
下⾯是具体解决⽅法
1. List item
⾸先要有git bash, 打开git bash, 输⼊where ssh命令, 到git bash ssh的位置, 如下图
2. 然后在环境变量-系统变量-Path中, 删除 openssh的路径, 新增Git bash ssh 的路径, 如下图
下图中的 openssh 路径已经被我删除了, 我的是 C:\Windows\System32\OpenSSH
3. 第三步: 修改VScode中相关的配置
在SSH Targets的配置⽂件中增加你的git ssh的路径, 注意要写双反斜杠

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。