修改了兩個配置。
1、Enables a mode for connecting using a single connection shared between windows and across window reloads. This makes it faster to open new windows and reduces the number of times a password needs to be entered.
"remote.SSH.useLocalServer": false
2、Specifies the timeout in seconds used for the SSH command that connects to the remote.
"remote.ssh.connectTimeout": 15
參考鏈接:https://stackoverflow.com/questions/59978826/why-ssh-connection-timed-out-in-vscode