用termius或者cmd等都能够连接上服务器,但是用vscode连接不上???

最近实验室的服务器进行重装更新了,开始使用wsl,现在直接装Linux系统的Ubantu。服务器的ip、端口、个人名字都没有变。也就相当于之前在termius等远程连接的软件上都能够连上。

我习惯用vscode,可是连不上,但是用termius或者cmd等都能够连接上。怪。

p1

下面输出了一堆内容,大堆的英文,丢给GPT或者自己仔细看看,就能看到,说了一个known-host文件,说是footprint改变了,需要将这个文件的第一行删除,才能在连接的时候连接上。

12:14:28.962] Install and start server if needed
[12:14:54.028] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\ssh.exe -V"
[12:14:54.030] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\bin\ssh.exe ENOENT
[12:14:54.031] Checking ssh with "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\libnvvp\ssh.exe -V"
[12:14:54.032] Got error from ssh: spawn C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8\libnvvp\ssh.exe ENOENT
[12:14:54.032] Checking ssh with "D:\downloadroads\anaconda3\ssh.exe -V"
[12:14:54.033] Got error from ssh: spawn D:\downloadroads\anaconda3\ssh.exe ENOENT
[12:14:54.033] Checking ssh with "D:\downloadroads\anaconda3\Library\mingw-w64\bin\ssh.exe -V"
[12:14:54.034] Got error from ssh: spawn D:\downloadroads\anaconda3\Library\mingw-w64\bin\ssh.exe ENOENT
[12:14:54.034] Checking ssh with "D:\downloadroads\anaconda3\Library\usr\bin\ssh.exe -V"
[12:14:54.035] Got error from ssh: spawn D:\downloadroads\anaconda3\Library\usr\bin\ssh.exe ENOENT
[12:14:54.035] Checking ssh with "D:\downloadroads\anaconda3\Library\bin\ssh.exe -V"
[12:14:54.036] Got error from ssh: spawn D:\downloadroads\anaconda3\Library\bin\ssh.exe ENOENT
[12:14:54.036] Checking ssh with "D:\downloadroads\anaconda3\Scripts\ssh.exe -V"
[12:14:54.037] Got error from ssh: spawn D:\downloadroads\anaconda3\Scripts\ssh.exe ENOENT
[12:14:54.037] Checking ssh with "D:\Program Files\Microsoft MPI\Bin\ssh.exe -V"
[12:14:54.039] Got error from ssh: spawn D:\Program Files\Microsoft MPI\Bin\ssh.exe ENOENT
[12:14:54.039] Checking ssh with "D:\downloadroads\vm\VMware Workstation\bin\ssh.exe -V"
[12:14:54.040] Got error from ssh: spawn D:\downloadroads\vm\VMware Workstation\bin\ssh.exe ENOENT
[12:14:54.040] Checking ssh with "C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe -V"
[12:14:54.041] Got error from ssh: spawn C:\Program Files\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[12:14:54.041] Checking ssh with "C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe -V"
[12:14:54.043] Got error from ssh: spawn C:\Program Files (x86)\Common Files\Oracle\Java\javapath\ssh.exe ENOENT
[12:14:54.043] Checking ssh with "C:\Windows\system32\ssh.exe -V"
[12:14:54.044] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT
[12:14:54.044] Checking ssh with "C:\Windows\ssh.exe -V"
[12:14:54.045] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT
[12:14:54.045] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V"
[12:14:54.046] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT
[12:14:54.046] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[12:14:54.047] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[12:14:54.047] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[12:14:54.079] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

[12:14:54.083] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 49205 "10.60.83.40" sh
[12:14:54.085] Generated SSH command: 'type "C:\Users\ADMINI~1\AppData\Local\Temp\vscode-linux-multi-line-command-10.60.83.40-945480192.sh" | "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 49205 "10.60.83.40" sh'
[12:14:54.085] Using connect timeout of 17 seconds
[12:14:54.086] Terminal shell path: C:\Windows\System32\cmd.exe
[12:14:54.533] > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @    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:7ZFGWmGbIAlnx+x/FtiuQDL4WLJKWnvk+vf9NoQfCyo.
> Please contact your system administrator.
> Add correct host key in C:\\Users\\Administrator/.ssh/known_hosts to get rid of this message.
> Offending ECDSA key in C:\\Users\\Administrator/.ssh/known_hosts:1
> ECDSA host key for xxx(ip和端口,在文本里面已被我删除) has changed and you have requested strict checking.
> Host key verification failed.
> 过程试图写入的管道不存在。
> @@@@@@@@@@@@@@@@@@@@@
> @@@@@@@@@@@@@@@@@@@@@
> @@@@@@@@@@@@@@@@@
> @    WARNING: REMOTE
> HOST IDENTIFICATION H
> AS CHANGED!     @
> @@@@@@@@@@@@@@@@@@@@@
> @@@@@@@@@@@@@@@@@@@@@
> @@@@@@@@@@@@@@@@@
> IT IS POSSIBLE THAT S
> OMEONE IS DOING SOMET
> HING NASTY!
> Someone could be eave
> sdropping on you righ
> t now (man-in-the-mid
> dle attack)!
> It is also possible t
> hat a host key has ju
> st been changed.
> The fingerprint for t
> he ECDSA key sent by
> the remote host is
> SHA256:7ZFGWmGbIAlnx+
> x/FtiuQDL4WLJKWnvk+vf
> 9NoQfCyo.
> Please contact your s
> ystem administrator.
> Add correct host key
> in C:\\Users\\Adminis
> trator/.ssh/known_hos
> ts to get rid of this
>  message.
> Offending ECDSA key i
> n C:\\Users\\Administ
> rator/.ssh/known_host
> s:1
> ECDSA host key for (ip+端口在文本里面已被我删除) has
>  changed and you have
>  requested strict che
> cking.
> Host key verification

p1

找到了相应的文件,删除第一行,重新连接,成功。

p3

找了很多方法,说要在服务器端下载vscode-server,但是服务器网络慢或者没有联网需要离线等,估计这个解决方案是另外的问题的。

posted @ 2025-07-03 12:56  loremmoqi  阅读(34)  评论(0)    收藏  举报