Vscode-remote-release: unable to connect to remote after update to version 0.50.0

Created on 11 Mar 2020  路  11Comments  路  Source: microsoft/vscode-remote-release

Issue Type: Bug

unable to connect to remote after update to version 0.50.0, if version downgraded to 0.49.0 it works normally.

Extension version: 0.49.0
VS Code version: Code - Insiders 1.44.0-insider (ef75c4bb445e5021065cf0012cfa2c66e55bfa16, 2020-03-11T09:14:53.536Z)
OS version: Windows_NT x64 10.0.17134
Remote OS version: Linux x64 4.15.0-88-generic


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz (4 x 3292)|
|GPU Status|2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled|
|Load (avg)|undefined|
|Memory (System)|7.96GB (1.81GB free)|
|Process Argv||
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: angular_serve|
|OS|Linux x64 4.15.0-88-generic|
|CPUs|Intel Xeon E312xx (Sandy Bridge, IBRS update) (4 x 2399)|
|Memory (System)|7.79GB (2.06GB free)|
|VM|0%|


needs-more-info

Most helpful comment

I had a similar problem and removing the remote vscode server and reinstalling it seemed to get it working agin.

All 11 comments

I have the same problem and dowgrading to 0.49.0 does indeed solve it. VSCode 1.43.0, local OS is macOS 10.15.2, remote OS is Ubuntu 18.04.

I had a similar problem and removing the remote vscode server and reinstalling it seemed to get it working agin.

I had the same problem. In my case it looks like it's trying to use the ssh executable from my git installation even though I have the native OpenSSH client installed and available in my PATH. Setting remote.SSH.path to the correct client seems to solve it for me.

Same problem here. downgrading indeed solves it.
whats up with the new upgrade, is it meant to be uninstalled & reinstalled?

I also have the same problem.
here are the log messages from output window.

[16:31:24.112] Log Level: 2
[16:31:24.117] [email protected]
[16:31:24.117] win32 x64
[16:31:24.118] SSH Resolver called for "ssh-remote+52.2.100.103", attempt 1
[16:31:24.118] SSH Resolver called for host: 52.2.100.103
[16:31:24.118] Setting up SSH remote "52.2.100.103"
[16:31:24.121] Acquiring local install lock: C:\Users\gregory\AppData\Local\Temp\vscode-remote-ssh-52.2.100.103-install.lock
[16:31:24.137] Looking for existing server data file at c:\Users\gregory\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-52.2.100.103-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[16:31:24.138] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[16:31:24.138] Install and start server if needed
[16:31:24.141] Checking ssh with "ssh -V"
[16:31:24.188] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:31:24.188] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[16:31:24.250] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:31:24.250] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[16:31:24.251] Got error from ssh: spawn C:\Program Files\Git\usr\bin\ssh.exe ENOENT
[16:31:24.251] Checking ssh with "C:\Program Files (x86)\Git\usr\bin\ssh.exe -V"
[16:31:24.252] Got error from ssh: spawn C:\Program Files (x86)\Git\usr\bin\ssh.exe ENOENT
[16:31:24.252] Checking ssh with "ssh -V"
[16:31:24.296] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:31:24.298] askpass server listening on \.\pipe\vscode-ssh-askpass-ee9ca85db616b092e8af4fbd263876538a8ba8fa-sock
[16:31:24.298] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-5e2343532c552bb4ead6794d74e70e8ef9ec07d1-sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","51913","52.2.100.103"],"dataFilePath":"c:\Users\gregory\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-52.2.100.103-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json"}
[16:31:24.298] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\gregory\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Program Files\Microsoft VS Code\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\gregory\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-ee9ca85db616b092e8af4fbd263876538a8ba8fa-sock"}
[16:31:24.345] Spawned 14700
[16:31:24.435] > local-server> Spawned ssh: 13936
[16:31:24.467] stderr> OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:31:24.533] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:Kj4WxuAjKRk+/7BfZ8wZfC7KS97tNXy/IaQ+Q1j5ElA
[16:31:24.739] Got askpass request: {"request":""}
[16:31:24.740] Listening for interwindow password on \.\pipe\vscode-ssh-askpass-67ef5becac5bc51459f347132a25bb227ae9247e-sock
[16:31:24.740] Writing password prompt to globalState
[16:31:36.925] Interactor gave response: **
[16:31:36.925] Cleaning up other-window auth server
[16:31:37.022] > Warning: no access to tty (Bad file descriptor).

Thus no job control in this shell.
[16:31:37.097] stderr> stty: standard input
[16:31:37.097] stderr> : Inappropriate ioctl for device
[16:31:37.103] > ready: 8cb70740405a
[16:31:37.104] > Linux 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015
[16:31:37.105] Platform: linux
[16:31:37.107] stderr> bash: line 1: break: only meaningful in a for',while', or until' loop [16:31:37.107] stderr> bash: line 2: syntax error near unexpected tokenfi'
[16:31:37.107] stderr> bash: line 2: ` fi'
[16:31:37.108] stderr> function: Command not found.
[16:31:37.108] > 8cb70740405a: running
[16:31:37.108] stderr> COMMIT_ID=78a4c91400152c0f27ba4d363eb56d2835f9903a: Command not found.
[16:31:37.108] stderr> EXTENSIONS=: Command not found.
[16:31:37.108] stderr> TELEMETRY=: Command not found.
[16:31:37.108] stderr> export: Command not found.
[16:31:37.108] stderr> ALLOW_CLIENT_DOWNLOAD=1: Command not found.
[16:31:37.108] stderr> VSCODE_AGENT_FOLDER: Undefined variable.
[16:31:37.109] stderr> fi: Command not found.
[16:31:37.109] stderr> Missing name for redirect.

I had a similar problem and removing the remote vscode server and reinstalling it seemed to get it working agin.

Solved it for me! thank you!

(Just this step, nothing else... no uninstalling, no downgrading).

I am having the same problem. Log:

`[12:46:06.065] Log Level: 2
[12:46:06.069] [email protected]
[12:46:06.069] win32 x64
[12:46:06.070] SSH Resolver called for "ssh-remote+lylg131", attempt 1
[12:46:06.070] SSH Resolver called for host: lylg131
[12:46:06.070] Setting up SSH remote "lylg131"
[12:46:06.073] Acquiring local install lock: C:\Users\KKAPLL~1\AppData\Local\Temp\vscode-remote-ssh-lylg131-install.lock
[12:46:06.086] Looking for existing server data file at c:\Users\kkapllani\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-lylg131-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[12:46:06.087] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[12:46:06.087] Install and start server if needed
[12:46:06.089] Checking ssh with "ssh -V"
[12:46:06.121] > OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
[12:46:06.122] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[12:46:06.151] > OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
[12:46:06.151] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[12:46:06.340] > OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[12:46:06.342] askpass server listening on \.\pipe\vscode-ssh-askpass-abbcb2cd9f02b36d617a2767148d53b88519eef6-sock
[12:46:06.342] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-d6ebe8bcf344339b57ac059f64f6b1b18592025e-sock","sshCommand":"C:\Program Files\Git\usr\bin\ssh.exe","sshArgs":["-v","-T","-D","58346","lylg131"],"dataFilePath":"c:\Users\kkapllani\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-lylg131-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json"}
[12:46:06.342] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\kkapllani\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Program Files\Microsoft VS Code\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\kkapllani\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-abbcb2cd9f02b36d617a2767148d53b88519eef6-sock"}
[12:46:06.393] Spawned 4896
[12:46:06.466] > local-server> Spawned ssh: 13900
[12:46:06.487] stderr> OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[12:46:06.702] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:ebjTkJ9umd4n3sAyCETriBBH965e7HVNqxksoCL/IU4
[12:46:07.046] > Warning: no access to tty (Bad file descriptor).

Thus no job control in this shell.
[12:46:07.263] > ready: 581698ba174e
[12:46:07.298] > Linux 3.10.0-693.17.1.el7.x86_64 #1 SMP Thu Jan 25 20:13:58 UTC 2018
[12:46:07.298] Platform: linux
[12:46:07.351] > 581698ba174e: running
[12:46:07.352] stderr> bash: line 1: syntax error near unexpected token then' [12:46:07.352] stderr> bash: line 1:then'
[12:46:07.352] stderr> function: Command not found.
[12:46:07.352] stderr> COMMIT_ID=78a4c91400152c0f27ba4d363eb56d2835f9903a: Command not found.
[12:46:07.352] stderr> EXTENSIONS=: Command not found.
[12:46:07.352] stderr> TELEMETRY=: Command not found.
[12:46:07.352] stderr> export: Command not found.
[12:46:07.352] stderr> ALLOW_CLIENT_DOWNLOAD=1: Command not found.
[12:46:07.355] stderr> VSCODE_AGENT_FOLDER: Undefined variable.
[12:46:07.355] stderr> _lock: Command not found.
`

I have the same problem and dowgrading to 0.49.0 does indeed solve it. VSCode 1.43.0, local OS is macOS 10.15.2, remote OS is Ubuntu 18.04.

This fix works for me.

I have the same problem I can't connect from a windows host to a linux Ubuntu 16.4 machine.
It however works for other linux machines.
Removal of the remote ~/.vscode-server(-insiders) folders didn't help.
A downgrade to 0.49 solved it for me.

Attached is the log with obscurring (###) where I saw fit.
```[16:26:13.588] Log Level: 2
[16:26:13.594] [email protected]
[16:26:13.594] win32 x64
[16:26:13.597] SSH Resolver called for "ssh-remote+###", attempt 1
[16:26:13.597] SSH Resolver called for host: ###
[16:26:13.597] Setting up SSH remote "###"
[16:26:13.601] Acquiring local install lock: C:\Users###\AppData\Local\Temp\vscode-remote-ssh-###-install.lock
[16:26:13.625] Looking for existing server data file at c:\Users###\AppData\Roaming\Code - Insiders\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-###-1df23554b2e3d5f1efc6fbc76ee###\data.json
[16:26:13.625] Using commit id "1df23554b2e3d5f1efc6fbc76ee61d3f7f186c6d" and quality "insider" for server
[16:26:13.626] Install and start server if needed
[16:26:13.630] Checking ssh with "ssh -V"
[16:26:13.677] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:26:13.678] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[16:26:13.713] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[16:26:13.713] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[16:26:13.757] > OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep 2019
[16:26:13.759] askpass server listening on \.\pipe\vscode-ssh-askpass-0e13bd0b429b9dd679777530b5173###-sock
[16:26:13.759] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-864e14fc44d092e3e3730c0e9c###-sock","sshCommand":"C:\Program Files\Git\usr\bin\ssh.exe","sshArgs":["-v","-T","-D","58734","###"],"dataFilePath":"c:\Users\###\AppData\Roaming\Code - Insiders\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-###-1df23554b2e3d5f1efc6fbc###\data.json"}
[16:26:13.759] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\###\.vscode-insiders\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\local-server\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\Users\###\AppData\Local\Programs\Microsoft VS Code Insiders\Code - Insiders.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\###\.vscode-insiders\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-0e13bd0b429b9dd679777530b51735###-sock"}
[16:26:13.768] Spawned 20128
[16:26:13.880] > local-server> Spawned ssh: 19888
[16:26:13.911] stderr> OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep 2019
[16:26:14.049] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:lVLZSWQsOtkFxH4D0fGcA7FE###
[16:26:14.346] > ready: c5356e9###
[16:26:14.379] > Linux 4.4.0-174-generic #204-Ubuntu SMP Wed Jan 29 06:41:01 UTC 2020
[16:26:14.379] Platform: linux
[16:26:14.418] > Installing extensions...

c5356e94e2a3: running
[16:26:14.420] stderr> bash: line 2: /server.sh: No such file or directory
[16:26:14.420] stderr> bash: line 3: syntax error near unexpected token fi' [16:26:14.420] stderr> bash: line 3: fi'
[16:26:14.421] stderr> -sh: 4: function: not found
[16:26:14.421] stderr> -sh: 20: [[: not found
[16:26:14.422] stderr> -sh: 83: Syntax error: "(" unexpected (expecting "then")
[16:26:14.423] stderr> Transferred: sent 14252, received 3084 bytes, in 0.2 seconds
[16:26:14.423] stderr> Bytes per second: sent 63013.3, received 13635.5
[16:26:14.427] > local-server> ssh child died, shutting down
[16:26:14.437] Local server exit: 0
[16:26:14.438] Received install output: OpenSSH_8.1p1, OpenSSL 1.1.1d 10 Sep 2019
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:lVLZSWQsOtkFxH4D0fGcA7FE###
Authenticated to # ([2001:bc8:###]:22).
ready: c5356e9###
Linux 4.4.0-174-generic #204-Ubuntu SMP Wed Jan 29 06:41:01 UTC 2020
Installing extensions...
c5356e94e2a3: running
bash: line 2: /server.sh: No such file or directory
bash: line 3: syntax error near unexpected token fi' bash: line 3: fi'
-sh: 4: function: not found
-sh: 20: [[: not found
-sh: 83: Syntax error: "(" unexpected (expecting "then")
Transferred: sent 14252, received 3084 bytes, in 0.2 seconds
Bytes per second: sent 63013.3, received 13635.5

[16:26:14.438] Failed to parse remote port from server output
[16:26:14.440] Resolver error:
[16:26:14.442] ------```

I tried removing the .vscode-server directory but it did not change the result.

I am running on the macOS Catalina 10.15.3 (19D76)

Vscode:
Version: 1.43.0
Commit: 78a4c91400152c0f27ba4d363eb56d2835f9903a
Date: 2020-03-09T19:34:44.548Z
Electron: 7.1.11
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.3.0

Remote SSH version: 0.50.0

Server:
Kernel: 3.10.0-693.11.1.el7.x86_64
Linux Distro: Red Hat Enterprise Linux Server release 7.4 (Maipo)
OpenSSH_7.9p1
LibreSSL 2.7.3

Reverting to 0.49.0 solved the issue for me.

Here is the log for the 0.50.0 version when connecting to the server:

[11:34:45.939] > Warning: no access to tty (Bad file descriptor).
> Thus no job control in this shell.
[11:34:46.005] > ready: bebae51eace3
[11:34:46.073] > Linux 3.10.0-693.11.1.el7.x86_64 #1 SMP Fri Oct 27 05:39:05 EDT 2017
[11:34:46.073] Platform: linux
[11:34:46.144] stderr> bash: line 1: syntax error near unexpected token `then'
[11:34:46.144] stderr> bash: line 1: `then'
[11:34:46.144] stderr> function: Command not found.
[11:34:46.144] stderr> COMMIT_ID=78a4c91400152c0f27ba4d363eb56d2835f9903a: Command not found.
[11:34:46.144] stderr> EXTENSIONS=: Command not found.
[11:34:46.145] > bebae51eace3: running
[11:34:46.145] stderr> TELEMETRY=: Command not found.
[11:34:46.145] stderr> export: Command not found.
[11:34:46.145] stderr> ALLOW_CLIENT_DOWNLOAD=1: Command not found.
[11:34:46.146] stderr> VSCODE_AGENT_FOLDER: Undefined variable.
[11:34:46.146] stderr> _lock: Command not found.

I am facing the same issue. Removing host directory does not help as well.

[17:16:42.761] > Linux 4.4.121-92.104-default #1 SMP Thu Mar 21 11:56:07 UTC 2019 (3f04f94)
[17:16:42.761] Platform: linux
[17:16:42.964] > 2a4ed32cef27: running
[17:16:42.965] stderr> bash: line 1: -z: command not found
[17:16:42.965] stderr> bash: line 2: syntax error near unexpected token `then'
[17:16:42.965] stderr> bash: line 2: `  then'
[17:16:42.965] stderr> function: Command not found.
[17:16:42.966] stderr> COMMIT_ID=78a4c91400152c0f27ba4d363eb56d2835f9903a: Command not found.

There are a few open issues here. A good general workaround:

"remote.SSH.useLocalServer": false,
"remote.SSH.windowsRemotes": ["<your remote hostname>"] // only if the remote is Windows

Can't tell which issue the OP had. I will close this in favor of other issues.

Was this page helpful?
0 / 5 - 0 ratings