How to?

remote-ssh-failed

May 21, 2024
softwares-and-toolsvscoderemote-ssh
2 Minutes
270 Words
This article was last updated on May 27, 2026 and some of the information may no longer be applicable due to the passage of time.

无法在远程服务器上自动安装 VSCode Server

关了梯子试试。23.9.18 这样解决的。但是随即又失败了,没有解决啊。

无法连接远程,但插件 Output 有正常输出

试试 https://stackoverflow.com/questions/64034813/vs-code-remote-ssh-connection-not-working 中的所有方法

24.5.21

  • (应该没有用)先删除本地 known_hosts

  • 删除远程 ~/.vscode-server/

  • 在本地 VSCode Settings 文件中加入

1
"remote.SSH.useLocalServer": false,
2
"remote.SSH.useExecServer": false,

成功。

24.6.19

  • error: 无法连接远程,插件输出 connectionTimeout
  • problem: 在插件输出中发现 ssh 命令是 ssh -v -T -D 49942 -o ConnectTimeout=15 47.103.61.134,没有用户名很奇怪(虽然使用 remote-ssh 的时候我是带用户名的)
  • 在 ~/.ssh/config 中添加一个 config 记录,手动指定用户名和服务器
1
Host mfa
2
HostName 47.103.61.134
3
User julyfun
  • 再检查检查有没有重复的 HostName,删除重复的
  • 成功

24.9.27

今天即使在 ssh config 中配好了 Host,还是 SSH Timed out. 排除法发现是 vscode ssh 命令自带的 ssh -T 选项造成的超时,该选项要求不分配伪终端。

结果还是通过在本地 settings 中添加此来解决:

1
"remote.SSH.useLocalServer": false,
2
"remote.SSH.useExecServer": false,
Article title:remote-ssh-failed
Article author:Julyfun
Release time:May 21, 2024
Copyright 2026
Sitemap