Vscode-remote-release: Cannot establish a connection to ssh (Maybe incompatible with vscode 1.43.0)

Created on 11 Mar 2020  Â·  5Comments  Â·  Source: microsoft/vscode-remote-release



After I upgrade the vscode to 1.43.0, I fail to connect to my remote server. I downgrade the vscode version to 1.42.1, it works well. I think this is caused by the incompatibility of the new vscode(1.43.0). Could you please help to update this extension?

  • VSCode Version:

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

  • Local OS Version: Darwin 19.3.0
  • Remote OS Version: CentOS Linux release 7.6.1810 (Core)
  • Remote Extension/Connection Type: SSH

Steps to Reproduce:

When connecting to the ssh server, it stucks at "Setting up SSH Host localhost: (details) Initializing VS Code Server". The logs are as follows:

[13:52:54.339] Log Level: 2
[13:52:54.339] [email protected]
[13:52:54.340] darwin x64
[13:52:54.341] SSH Resolver called for "ssh-remote+localhost", attempt 1
[13:52:54.341] SSH Resolver called for host: localhost
[13:52:54.341] Setting up SSH remote "localhost"
[13:52:54.344] Acquiring local install lock: /var/folders/4f/bzlj5ndj7050qw4l0cgbg3680000gn/T/vscode-remote-ssh-localhost-install.lock
[13:52:54.347] Looking for existing server data file at /Users/maple/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-localhost-78a4c91400152c0f27ba4d363eb56d2835f9903a/data.json
[13:52:54.348] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[13:52:54.349] Install and start server if needed
[13:52:54.353] Checking ssh with "ssh -V"
[13:52:54.376] > OpenSSH_7.9p1, LibreSSL 2.7.3
[13:52:54.379] askpass server listening on /var/folders/4f/bzlj5ndj7050qw4l0cgbg3680000gn/T/vscode-ssh-askpass-1b403c8d92fa2e663697272bad36e8f961ae02f1.sock
[13:52:54.379] Spawning local server with {"ipcHandlePath":"/var/folders/4f/bzlj5ndj7050qw4l0cgbg3680000gn/T/vscode-ssh-askpass-da0e9a02123b785944ece717be5f2c7b511b1a91.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","61097","-o","ConnectTimeout=15","localhost"],"dataFilePath":"/Users/maple/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-localhost-78a4c91400152c0f27ba4d363eb56d2835f9903a/data.json"}
[13:52:54.379] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/maple/.vscode/extensions/ms-vscode-remote.remote-ssh-0.50.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer)","VSCODE_SSH_ASKPASS_MAIN":"/Users/maple/.vscode/extensions/ms-vscode-remote.remote-ssh-0.50.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/4f/bzlj5ndj7050qw4l0cgbg3680000gn/T/vscode-ssh-askpass-1b403c8d92fa2e663697272bad36e8f961ae02f1.sock"}
[13:52:54.404] Spawned 5456
[13:52:54.492] > local-server> Spawned ssh: 5457
[13:52:54.501] stderr> OpenSSH_7.9p1, LibreSSL 2.7.3
[13:52:54.720] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:YU/m5cU8+IrIf5mOeGwGdnVKEwZVdwOqg2i2MPauuNo
[13:52:55.411] > Warning: no access to tty (Bad file descriptor).

Thus no job control in this shell.
[13:52:55.646] > Wed Mar 11 13:52:55 HKT 2020
ready: 0cb4b5d9697a
[13:52:55.705] > Linux 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019
[13:52:55.705] Platform: linux
[13:52:55.813] stderr> bash: line 1: syntax error near unexpected token then' [13:52:55.813] stderr> bash: line 1:e_flock == "1" ]]; then'
[13:52:55.818] > 0cb4b5d9697a: running
[13:52:55.819] stderr> function: Command not found.
[13:52:55.819] stderr> COMMIT_ID=78a4c91400152c0f27ba4d363eb56d2835f9903a: Command not found.
[13:52:55.819] stderr> EXTENSIONS=: Command not found.
[13:52:55.819] stderr> TELEMETRY=--disable-telemetry: Command not found.
[13:52:55.819] stderr> export: Command not found.
[13:52:55.819] stderr> ALLOW_CLIENT_DOWNLOAD=1: Command not found.
[13:52:55.819] stderr> VSCODE_AGENT_FOLDER: Undefined variable.
[13:52:55.819] stderr> _lock: Command not found.


Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes

*duplicate

Most helpful comment

Same problem...seems to have been introduced in 0.50. Doesn’t affect all servers (google cloud server is fine, local server fails).

Alternative workaround that fixed it for me:

  • click ‘extensions’
  • click the cog icon next to ‘Remote - SSH’
  • choose ‘Install another version’
  • select version 0.49.0

All 5 comments

Same issue here. Workaround:

  1. Uninstall the "Remote Development" extension, and all related extensions from the pack
  2. Disable auto-updates in VSCode user preferences (I set it to "manual")
  3. Remove VSCode 1.43
  4. Download VSCode 1.42.1 (the January release) here
  5. Install "Remote Development" plugin

Same problem...seems to have been introduced in 0.50. Doesn’t affect all servers (google cloud server is fine, local server fails).

Alternative workaround that fixed it for me:

  • click ‘extensions’
  • click the cog icon next to ‘Remote - SSH’
  • choose ‘Install another version’
  • select version 0.49.0

Same problem...seems to have been introduced in 0.50. Doesn’t affect all servers (google cloud server is fine, local server fails).

Alternative workaround that fixed it for me:

  • click ‘extensions’
  • click the cog icon next to ‘Remote - SSH’
  • choose ‘Install another version’
  • select version 0.49.0

this worked just fine, thank you.

@colonelsammy thanks much, that worked like a charm.

For anyone else trying this:
When I performed the steps listed above I needed to 1 - restart VS Code (this is indicated in the IDE in an obvious way) and 2 - (if using a key) when I first attempted to connect to the ssh client I was prompted for a password one more time...after hitting _Esc_ Vs Code successfully used the key.

I may have been an odd case because I was messing with my ssh config and settings pretty heavily yesterday looking for a fix without rolling back .

Was this page helpful?
0 / 5 - 0 ratings