我正在尝试使用 VSCode - Insiders 使用 Remote - SSH 插件在远程 AWS 机器中的 docker 容器上运行代码。我已经打开了一个终端并像这样设置端口转发:ssh -L 2201:localhost:2222 user@host -N -i ~/.ssh/id_rsa
. 然后在 VSCode 中我尝试连接root@localhost
并启动,但随后给了我一条错误消息:
> Found existing installation...
> Found running server...
>
> bash: no job control in this shell
"install" terminal command done
Received install output: bash: no job control in this shell
Failed to parse remote port from server output: bash: no job control in this shell
几天前我开始做这个过程,它奏效了。昨天有点进进出出,今天根本不工作。我尝试将其关闭并再次打开,但无法使其正常工作。万一它是相关的,我在带有 Mojave OS 的 MacOS 上。
编辑:
神奇的是,它今天(第二天)第一次起作用。我仍然有兴趣知道下次它坏了如何解决这个问题。如果这有帮助,这是它工作时的输出:
SSH Resolver called for "ssh-remote+7b22686..."
SSH Resolver called for host: root@localhost
Setting up SSH remote "localhost"
Using commit id "473af338..." and quality "insider" for server
Using SSH config file "/Users/user/config"
Install and start server if needed
> Found existing installation...
> Found running server...
>
> bash: no job control in this shell
> 368805d0-03...==38466==
"install" terminal command done
Received install output: 368805d0-03...==38466==
Server is listening on port 38466
Using SSH config file "/Users/user/config"
Spawning tunnel with: ssh -F /Users/user/config root@localhost -N -L localhost:39003:localhost:38466
Spawned SSH tunnel between local port 39003 and remote port 38466
Waiting for ssh tunnel to be ready
Tunneling remote port 38466 to local port 39003
Resolving "ssh-remote+7b22686f737..." to "localhost:39003", attempt: 1
编辑2:现在(第二天)它不再工作了。
编辑 3:我在 ~/config.xml 有一个配置文件。以下是内容:
Host *
User root
Port 2201
IdentityFile ~/id_rsa