Linux疑难杂惑 | 云服务器重装系统后vscode无法远程连接的问题

报错原因:本地的known_hosts文件记录服务器信息与现服务器的信息冲突了,导致连接失败。

解决方法:找到本地的known_hosts文件,把里面的所有东西删除后保存就好了。

该文件的路径可以在报错中寻找:比如我的路径就是:

复制代码
[20:46:09.521] Log Level: 3
[20:46:09.530] remote-ssh@0.49.0
[20:46:09.530] win32 x64
[20:46:09.531] SSH Resolver called for "ssh-remote+7b22686f73744e616d65223a2254656e63656e74227d", attempt 1
[20:46:09.532] SSH Resolver called for host: Tencent
[20:46:09.532] Setting up SSH remote "Tencent"
[20:46:09.559] Using commit id "c47d83b293181d9be64f27ff093689e8e7aed054" and quality "stable" for server
[20:46:09.559] Install and start server if needed
[20:46:09.565] Checking ssh with "ssh -V"
[20:46:09.625] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[20:46:09.628] Running script with connection command: ssh -T -D 51303 Tencent bash
[20:46:09.630] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[20:46:09.776] > 
> 
...
> �]0;C:\WINDOWS\System32\cmd.exe�
[20:46:09.776] Got some output, clearing connection timeout
[20:46:09.783] > 
> 
...
[20:46:09.992] > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> 
[20:46:09.999] > @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
> Someone could be eavesdropping on you right now (man-in-the-middle attack)!     
> It is also possible that a host key has just been changed.
> The fingerprint for the ECDSA key sent by the remote host is
> SHA256:teZb8yKzveqH5iVGOEalepGRmKhWlD2LZLNe0QqOChg.
> Please contact your system administrator.
> Add correct host key in C:\\Users\\ASUS/.ssh/known_hosts to get rid of this mes
> sage.
> Offending ECDSA key in C:\\Users\\ASUS/.ssh/known_hosts:14
> ECDSA host key for 106.*.249.* has changed and you have requested strict chec
> king.
> Host key verification failed.
> 过程试图写入的管道不存在。
> 
[20:46:10.332] "install" terminal command done
[20:46:10.332] Install terminal quit with output: 过程试图写入的管道不存在。
[20:46:10.332] Received install output: 过程试图写入的管道不存在。
[20:46:10.334] Stopped parsing output early. Remaining text: 过程试图写入的管道不存在。
[20:46:10.334] Failed to parse remote port from server output
[20:46:10.335] Resolver error: 
[20:46:10.341] ------
相关推荐
段帅龙呀5 小时前
Redis构建缓存服务器
服务器·redis·缓存
乌鸦不像写字台6 小时前
【docker部署】在服务器上使用docker
服务器·docker·容器
界面开发小八哥7 小时前
「Java EE开发指南」如何用MyEclipse创建一个WEB项目?(三)
java·ide·java-ee·myeclipse
花花鱼7 小时前
android studio 设置让开发更加的方便,比如可以查看变量的类型,参数的名称等等
android·ide·android studio
Antonio9158 小时前
【音视频】HLS简介与服务器搭建
运维·服务器·音视频
kfepiza9 小时前
Debian的`/etc/network/interfaces`的`allow-hotplug`和`auto`对比讲解 笔记250704
linux·服务器·网络·笔记·debian
无妄-20249 小时前
软件架构升级中的“隐形地雷”:版本选型与依赖链风险
java·服务器·网络·经验分享
R.X. NLOS9 小时前
VS Code远程开发新方案:使用SFTP扩展解决Remote-SSH连接不稳定问题
运维·服务器·ssh·debug·vs code
到底起什么网名才能不重名12 小时前
使用各种CSS美化网页
前端·css·vscode·bootstrap·html
轩情吖13 小时前
Qt的第一个程序(2)
服务器·数据库·qt·qt creator·qlineedit·hello world·编辑框