Vscode-remote-release: 0.50.0 version fails to connect

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

Hi,
My extension just suddenly stops working when it was updated to 0.50.0. I downgraded the extension to the previous version and I continue working.

I connect to Red Hat Enterprise Linux Server release 7.6

Best regards,
Arturo

*duplicate

Most helpful comment

I also could not connect once upgraded to 0.50.0, but could connect as soon as I reverted to 0.49.0. I think it is related to #19, @arturo-salinas do you have csh/tcsh as the default on your server?

I noticed this in the output, it seems to be trying to run bash commands:

[08:34:14.491] stderr> bash: line 1: syntax error near unexpected token `then'
[08:34:14.492] stderr> bash: line 1: `e_flock == "1" ]]; then'

EDIT: should mention that I am on RHEL 7.4

All 12 comments

I also could not connect once upgraded to 0.50.0, but could connect as soon as I reverted to 0.49.0. I think it is related to #19, @arturo-salinas do you have csh/tcsh as the default on your server?

I noticed this in the output, it seems to be trying to run bash commands:

[08:34:14.491] stderr> bash: line 1: syntax error near unexpected token `then'
[08:34:14.492] stderr> bash: line 1: `e_flock == "1" ]]; then'

EDIT: should mention that I am on RHEL 7.4

I am seeing the same with the syntax error on 0.50.0 - also rhel 7.6 with csh / tcsh

Could someone share the full log? And a workaround might be setting "remote.SSH.useLocalServer": false

my log (lightly anonimized):

[17:00:10.594] Log Level: 2
[17:00:10.600] [email protected]
[17:00:10.600] win32 x64
[17:00:10.602] SSH Resolver called for "ssh-remote+thehost", attempt 1
[17:00:10.603] SSH Resolver called for host: thehost
[17:00:10.603] Setting up SSH remote "thehost"
[17:00:10.607] Acquiring local install lock: C:\Users\MYUSER~1.USE\AppData\Local\Temp\vscode-remote-ssh-thehost-install.lock
[17:00:10.616] Looking for existing server data file at c:\Users\username\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-thehost-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[17:00:10.617] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[17:00:10.618] Install and start server if needed
[17:00:10.620] Checking ssh with "ssh -V"
[17:00:10.684] > OpenSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019
[17:00:10.685] askpass server listening on \\.\pipe\vscode-ssh-askpass-fb42e85ca714ac0b8c2aa3514bb97e849c2477ff-sock
[17:00:10.686] Spawning local server with {"ipcHandlePath":"\\\\.\\pipe\\vscode-ssh-askpass-98222beeb9297bc713ff5c894ddb08559695bb61-sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","59977","thehost"],"dataFilePath":"c:\\Users\\username\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-vscode-remote.remote-ssh\\vscode-ssh-host-thehost-78a4c91400152c0f27ba4d363eb56d2835f9903a\\data.json"}
[17:00:10.686] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\\Users\\username\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\local-server\\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\\Users\\username\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\\Users\\username\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\\\.\\pipe\\vscode-ssh-askpass-fb42e85ca714ac0b8c2aa3514bb97e849c2477ff-sock"}
[17:00:10.690] Spawned 7236
[17:00:10.771] > local-server> Spawned ssh: 13628
[17:00:10.808] stderr> OpenSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019
[17:00:11.579] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:gUeP4iGoOyYrVgnkAoi+onr2xuCBacO+PnhUeP59D7c
[17:00:11.881] stderr> Authenticated to thehost ([192.168.168.11]:22).
[17:00:12.276] > Warning: no access to tty (Bad file descriptor).
> Thus no job control in this shell.
[17:00:12.465] > ready: 249944f4af8d
[17:00:12.471] > Linux 3.10.0-957.12.1.el7.x86_64 #1 SMP Wed Mar 20 11:34:37 UTC 2019
[17:00:12.471] Platform: linux
[17:00:12.483] > 249944f4af8d: running
[17:00:12.483] stderr> bash: line 1: syntax error near unexpected token `then'
[17:00:12.483] stderr> bash: line 1: `then'
[17:00:12.483] stderr> function: Command not found.
[17:00:12.484] stderr> COMMIT_ID=78a4c91400152c0f27ba4d363eb56d2835f9903a: Command not found.
[17:00:12.485] stderr> EXTENSIONS=: Command not found.
[17:00:12.485] stderr> TELEMETRY=: Command not found.
[17:00:12.486] stderr> export: Command not found.
[17:00:12.486] stderr> ALLOW_CLIENT_DOWNLOAD=1: Command not found.
[17:00:12.489] stderr> VSCODE_AGENT_FOLDER: Undefined variable.
[17:00:12.489] stderr> _lock: Command not found.

Are you using a non-bash shell on the remote?

As above, tcsh - (not something I have control over in this environment)

Same issue as above.
Also using tcsh (Don't have control over this)

I have tried setting the task automation shell for linux to point to bash, however that seems to have no effect and produces the same error.

The workaround with setting remote.SSH.useLocalServer to false seems to do the trick and I can get my ssh sessions again.

With useLocalServer = false, the ssh args are -T -D <port> <host> bash

[19:51:26.025] Running script with connection command: ssh -T -D 56324 DESKTOP-C45PBBJ bash

With useLocalServer = true, the ssh args are -v -T -D <port> <host> (without bash, and -v may be related to the log level in my config)

[21:59:12.127] Spawning local server with {"ipcHandlePath":"\\\\.\\pipe\\vscode-ssh-askpass-1108ca1c8798d839f878cce0d25e88cf2f137ee5-sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","60093","DESKTOP-C45PBBJ"],"dataFilePath":"c:\\Users\\hirata\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-vscode-remote.remote-ssh\\vscode-ssh-host-DESKTOP-C45PBBJ-78a4c91400152c0f27ba4d363eb56d2835f9903a\\data.json"}

Not sure if the issues I am seeing fall into this ticket, but with the recent update to VS Code and this extension the setting "remote.SSH.showLoginTerminal": true, doesn't seem to be honored. The extension returns to asking for the password at the top of VS Code, but doesn't even ask to enter the password, it sort of assume.

image

A few people were seeing VS Code/Remote using the %HOME% variable now, is that true? Thus, which was not the same as the generic user directories of C:\Users\USER_NAME.ssh. The %HOME% path is controlled by admin and thus we can't change it. Thus, we have to copy over the data from the generic user folder to the %HOME% folder on Windows 10 Enterprise

In addition, not sure why this message has started to appear which is very annoying

Failed to find a non-Windows SSH installed. Password prompts may not be displayed properly! Disable remote.SSH.useLocalServer if needed.

Tomorrow morning I will publish an update with useLocalServer disabled by default, then I will break out all the different issues that are resulting from this and dig into them. Until then you can continue to disable it locally as a workaround.

duplicate #2527

Was this page helpful?
0 / 5 - 0 ratings