Visual Studio Code 中的远程 SSH 不起作用 [英] Remote SSH in Visual Studio Code does not work

查看:72
本文介绍了Visual Studio Code 中的远程 SSH 不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Visual Studio Code 中使用了 Microsoft 的远程 SSH 扩展来从我的 Windows 10 机器连接到我的 Raspberry Pi 4.直到有一天,它运行良好.输入正确的密码三次后,它输出此进程试图写入不存在的管道".我仍然可以通过终端和 Putty 进行连接.我正在使用主持人的密码登录.

I have used the Remote SSH extension by Microsoft in Visual Studio Code to connect from my Windows 10 machine to my Raspberry Pi 4. It worked fine until one day. After three times entering the correct password, it outputs "This process tried to write to a nonexistent pipe". I can still connect via the terminal and Putty. I am using the host's password to log in.

我尝试卸载该扩展程序,尝试了较早的版本并在另一台 Windows 10 计算机上测试了该扩展程序,但没有任何运气.我还在 vscode 设置中添加了 ssh 配置文件的确切路径.

I have tried to uninstall the extension, tried an earlier version and tested the extension on another Windows 10 computer without any luck. I have also added the exact path to the ssh config file in the vscode settings.

我能做什么?

推荐答案

我通过为 ssh 连接创建公钥和私钥解决了这个问题.我将公钥添加到 Raspberry Pi 上的 .ssh 文件夹中.在 vscode 中,我在 ssh 连接的配置文件中添加了私钥的路径.

I solved this issue by creating a public and private key for my ssh connection. I added the public key to a .ssh folder on my Raspberry Pi. In vscode I added the path to the private key in the config file for the ssh connection.

我使用了这个视频 https://www.youtube.com/watch?v=vpk_1gldOAE 学习如何生成密钥.

I used this video https://www.youtube.com/watch?v=vpk_1gldOAE to learn how to generate the keys.

这篇关于Visual Studio Code 中的远程 SSH 不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆