6

I am trying to use VSCode - Insiders to run code on a docker container in a remote AWS machine using the Remote - SSH plugin. I have opened a terminal and set up port forwarding like so: ssh -L 2201:localhost:2222 user@host -N -i ~/.ssh/id_rsa. Then in VSCode I try to connect to root@localhost and it starts up, but then gives me an error message:

> 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

I started doing this process a couple days ago and it worked. Yesterday it was in and out a bit, and today it's not working at all. I've tried turning it off and on again, but can't get it to work. In case it's relevant, I am on MacOS with the Mojave OS.

Edit:

Magically, it worked today (the following day) the first time. I would still be interested in knowing how to fix this next time it breaks. In case this helps, here's the output from when it is working:

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

Edit 2: And now (the following following day) it's not working again.

Edit 3: I have a config file at ~/config. Here are the contents:

Host *
     User root
     Port 2201
     IdentityFile ~/id_rsa
jss367
  • 4,759
  • 14
  • 54
  • 76

2 Answers2

1

In the specific implementation shown above, you have User root in your config and are logging in with root@localhost, so you have your username twice. Leave the config file as is and just enter localhost in VSCode. This still doesn't solve the instability issue, but it does fix one problem.

jss367
  • 4,759
  • 14
  • 54
  • 76
  • The instability issues were solved after a few of the most recent updates. It's much more stable now. – jss367 Aug 10 '19 at 14:23
0

I have the same issue when configuring my server. It solved by this issue. After save your config file for remote server, change the remote shell path like this issue, and then connect, you will in.

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

milkice
  • 455
  • 6
  • 10
  • I have a config file at ~/config. Is there a separate one for the remote server? I posted the contents above. – jss367 May 14 '19 at 14:19
  • My `Terminal › Integrated › Shell: Linux` is already `/bin/bash`, same as the one you posted. – jss367 May 14 '19 at 14:23