无法从服务器输出解析远程端口:bash:此shell中没有作业控件

时间:2019-05-10 03:42:00

标签: visual-studio-code vscode-remote

我正在尝试使用VSCode-内部人员使用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处有一个配置文件。这里是内容:

Host *
     User root
     Port 2201
     IdentityFile ~/id_rsa

2 个答案:

答案 0 :(得分:1)

在上面显示的特定实现中,您在配置中拥有User root并使用root@localhost登录,因此您有两次用户名。保持配置文件不变,只需在VSCode中输入localhost。仍然不能解决不稳定问题,但是可以解决一个问题。

答案 1 :(得分:0)

配置服务器时,我遇到相同的问题。它解决了这个问题。保存用于远程服务器的配置文件后,像这样,更改远程Shell路径,然后连接即可。

https://github.com/microsoft/vscode-remote-release/issues/220#issuecomment-490374437

相关问题