Problem Description
In the process of using the server, I suddenly disconnected from the server, and the error is as follows: could not establish connection to
[20:23:39.487] > ssh: connect to host 10.201.0.131 port 22: Connection timed out
>
[20:23:39.495] > 过程试图写入的管道不存在。
>
[20:23:40.759] "install" terminal command done
[20:23:40.759] Install terminal quit with output: 过程试图写入的管道不存在。
[20:23:40.759] Received install output: 过程试图写入的管道不存在。
[20:23:40.760] Failed to parse remote port from server output
[20:23:40.762] Resolver error: Error:
at g.Create (c:\Users\asus\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:584147)
at t.handleInstallOutput (c:\Users\asus\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:582761)
at t.tryInstall (c:\Users\asus\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:680758)
at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
at async c:\Users\asus\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:643114
at async t.withShowDetailsEvent (c:\Users\asus\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:646432)
at async t.resolve (c:\Users\asus\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:644164)
at async c:\Users\asus\.vscode\extensions\ms-vscode-remote.remote-ssh-0.96.0\out\extension.js:1:721750
[20:23:40.771] ------
solution
I saw someone go directly to
(1) Law One
Computer - C drive - user - user name - .ssh folder - delete the known_hosts file, it can be solved.
method from:
(2) Law 2
Use win+R - CMD - where ssh to get your own ssh path:
(Mine is) C:\Windows\System32\OpenSSH\ssh.exe
My Computer - Properties - Advanced System Settings - Advanced - Environment Variables - System Variables - path
Delete, C:\Windows\System32\OpenSSH\, create: C:\Windows\System32\OpenSSH\
Someone solved it with this method, source:
Unfortunately this method didn't work for me.
(3) Method Three
ctrl+shift+p——remote-ssh:settings
Fill in the absolute path of your config file.
The law comes from here:
Still didn't solve the problem.
(4) Method Four
Use the ping command to test whether the server can connect.
If the ping fails to connect, it means that the server is offline and needs to be restarted.
If ping can connect to the server, it means that there are three possible errors above.
My problem finally found that it was not a personal setting problem, but a problem with the server. Restart and then set it up.