Vscode-remote-release: Remote SSH password keeps asking password (Installation already in progress)

Created on 10 Mar 2020  ·  27Comments  ·  Source: microsoft/vscode-remote-release

Issue Type: Bug

  1. Connect to SSH server
  2. Password prompt shows up
  3. Type password and Enter

VSCODE keeps asking password, i.e., repeating steps 2 and 3. I tried password input repeat at least 7 times.

Before showing the password prompt up, a message pops up saying,

"Failed to find a non-Windows SSH installed, Password prompts may not be displayed properly.
Disable 'remote.SSH.userLocalServer' if needed."
Source: Remote - SSH (Extension)

I tried disabling remote.SSH.userLocalServer, but, it did not work.

As this started after VSCODE update to 1.43, I rolled back the VSCODE version to 1.42.1 and re-installed Remote SSH. Then, the same remote connection came back to work as it used to before this VSCODE update.

FYI, currently, the VSCODE version is 1.43 as you see because I updated it again to show you the system information that is actually having trouble. I also tried "Remote - SSH (Nightly)," but, it did not work either.

Extension version: 0.50.0
VS Code version: Code 1.43.0 (78a4c91400152c0f27ba4d363eb56d2835f9903a, 2020-03-09T19:47:57.235Z)
OS version: Windows_NT x64 10.0.17134


System Info

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i7-4910MQ CPU @ 2.90GHz (8 x 2893)|
|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)|31.91GB (22.89GB free)|
|Process Argv|-n|
|Screen Reader|no|
|VM|0%|


bug ssh verified

Most helpful comment

You should be able to get out of this state by deleting the file in the log, /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a or running the command "Kill VS Code Server on Host..."

If it happens again, you might try setting remote.SSH.useFlock.

All 27 comments

Could you try again with 1.43 and share the full log from the Remote-SSH output channel? Thanks

Here is the full log. I tried the password input twice, and then, entered Escape to cancel. Thank you.

>

[13:54:45.512] Log Level: 2
[13:54:45.528] [email protected]
[13:54:45.528] win32 x64
[13:54:45.530] SSH Resolver called for "ssh-remote+#####", attempt 1
[13:54:45.530] SSH Resolver called for host: #####
[13:54:45.530] Setting up SSH remote "#####"
[13:54:48.676] Acquiring local install lock: C:\Users#####\AppData\Local\Temp\vscode-remote-ssh-#####-install.lock
[13:54:48.698] Looking for existing server data file at c:\Users#####\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-#####-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[13:54:48.699] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[13:54:48.701] Install and start server if needed
[13:54:48.708] Checking ssh with "ssh -V"
[13:54:48.834] > OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
[13:54:48.836] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[13:54:48.937] > OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
[13:54:48.938] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[13:54:48.940] Got error from ssh: spawn C:\Program Files\Git\usr\bin\ssh.exe ENOENT
[13:54:48.940] Checking ssh with "C:\Program Files (x86)\Git\usr\bin\ssh.exe -V"
[13:54:48.942] Got error from ssh: spawn C:\Program Files (x86)\Git\usr\bin\ssh.exe ENOENT
[13:54:48.943] Checking ssh with "ssh -V"
[13:54:49.061] > OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
[13:54:49.066] askpass server listening on \.\pipe\vscode-ssh-askpass-10f1e3a37899899084f3ef9eb2c1df60ebb3fc83-sock
[13:54:49.067] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-2dc9a47ece8f3ed6946ea819959e0b1767a5d6c4-sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","53592","#####"],"dataFilePath":"c:\Users\#####\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-#####-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json"}
[13:54:49.067] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\#####\.vscode\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\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\#####\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-10f1e3a37899899084f3ef9eb2c1df60ebb3fc83-sock"}
[13:54:49.155] Spawned 3144
[13:54:49.472] > local-server> Spawned ssh: 11480
[13:54:49.547] stderr> OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
[13:54:49.787] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:/siRSaOogzr547Cef6EvttFUapm+RX4UJ+1Wi+bSt+U
[13:54:55.361] Got askpass request: {"request":""}
[13:54:55.363] Listening for interwindow password on \.\pipe\vscode-ssh-askpass-fcfda7fecb8555d06fddf76a95ebb5ba11605736-sock
[13:54:55.363] Writing password prompt to globalState
[13:55:03.875] Interactor gave response: **
[13:55:03.875] Cleaning up other-window auth server
[13:55:04.139] > Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.11.0-12-generic x86_64)

214 packages can be updated.
144 updates are security updates.

New release '16.04.6 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
[13:55:04.178] > ready: a7e46984b979
[13:55:04.183] > Linux 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013
[13:55:04.184] Platform: linux
[13:55:04.197] > a7e46984b979: running
[13:55:04.234] > Acquiring lock on /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a
[13:55:04.259] > ln /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a.target /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a
[13:55:04.260] stderr> ln: failed to create hard link ‘/home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a’: File exists
[13:55:04.261] > Installation already in progress...
a7e46984b979##24##
[13:55:04.261] Received install output: a7e46984b979##24##
[13:55:04.262] Server installation process already in progress - waiting and retrying
[13:55:04.262] Terminating local server
[13:55:04.274] Local server exit: null
[13:55:05.270] askpass server listening on \.\pipe\vscode-ssh-askpass-63c597853640be3b4eb92130008438eb7b56c33a-sock
[13:55:05.271] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-97cf8034fec45b30879d1311a33fca198304c52b-sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","53592","#####"],"dataFilePath":"c:\Users\#####\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-#####-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json"}
[13:55:05.271] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\#####\.vscode\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\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\#####\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-63c597853640be3b4eb92130008438eb7b56c33a-sock"}
[13:55:05.357] Spawned 12620
[13:55:05.800] > local-server> Spawned ssh: 4008
[13:55:05.871] stderr> OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
[13:55:06.026] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:/siRSaOogzr547Cef6EvttFUapm+RX4UJ+1Wi+bSt+U
[13:55:11.448] Got askpass request: {"request":""}
[13:55:11.450] Listening for interwindow password on \.\pipe\vscode-ssh-askpass-a1c32491630414d7e89b19049b9f588016accabc-sock
[13:55:11.450] Writing password prompt to globalState
[13:55:16.349] Interactor gave response: **
[13:55:16.349] Cleaning up other-window auth server
[13:55:16.956] > Welcome to Ubuntu 14.04.5 LTS (GNU/Linux 3.11.0-12-generic x86_64)

214 packages can be updated.
144 updates are security updates.

New release '16.04.6 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
[13:55:16.959] > ready: a7e46984b979
[13:55:16.965] > Linux 3.11.0-12-generic #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013
[13:55:16.967] Platform: linux
[13:55:17.234] > a7e46984b979: running
[13:55:17.269] > Acquiring lock on /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a
[13:55:17.276] > ln /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a.target /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a
[13:55:17.276] stderr> ln: failed to create hard link ‘/home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a’: File exists
[13:55:17.276] > Installation already in progress...
a7e46984b979##24##
[13:55:17.276] Received install output: a7e46984b979##24##
[13:55:17.276] Server installation process already in progress - waiting and retrying
[13:55:17.276] Terminating local server
[13:55:17.286] Local server exit: null
[13:55:18.291] askpass server listening on \.\pipe\vscode-ssh-askpass-2046c632e1ae846170496a46927000e3e4f99a31-sock
[13:55:18.295] Spawning local server with {"ipcHandlePath":"\\.\pipe\vscode-ssh-askpass-7dd2f7f567e0a16ab0ed5e1853a94e091f4d59e2-sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","53592","#####"],"dataFilePath":"c:\Users\#####\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-#####-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json"}
[13:55:18.296] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\Users\#####\.vscode\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\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\Users\#####\.vscode\extensions\ms-vscode-remote.remote-ssh-0.50.0\out\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\.\pipe\vscode-ssh-askpass-2046c632e1ae846170496a46927000e3e4f99a31-sock"}
[13:55:18.427] Spawned 17840
[13:55:18.714] > local-server> Spawned ssh: 1408
[13:55:18.789] stderr> OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
[13:55:18.918] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:/siRSaOogzr547Cef6EvttFUapm+RX4UJ+1Wi+bSt+U
[13:55:24.578] Got askpass request: {"request":""}
[13:55:24.579] Listening for interwindow password on \.\pipe\vscode-ssh-askpass-f51ac2a2fd41caf751316a3140e1814023bb2e54-sock
[13:55:24.579] Writing password prompt to globalState
[13:55:25.815] Interactor signaled cancel
[13:55:25.815] Cleaning up other-window auth server
[13:55:25.865] stderr> Permission denied, please try again.
[13:55:26.302] Got askpass request: {"request":""}
[13:55:26.339] stderr> Permission denied, please try again.
[13:55:26.759] Got askpass request: {"request":""}
[13:55:26.794] stderr> #####@#####: Permission denied (publickey,password).
[13:55:26.806] > local-server> ssh child died, shutting down
[13:55:26.829] Local server exit: 0
[13:55:26.830] Received install output: OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:/siRSaOogzr547Cef6EvttFUapm+RX4UJ+1Wi+bSt+U
Permission denied, please try again.
Permission denied, please try again.

@#####: Permission denied (publickey,password).

>

[13:55:26.835] Resolver error: Permission denied (publickey,password).
[13:55:26.838] ------

Similar issue, in the output window I can see my connection is successful, I get the output that is expected when you successfully connect to my host, but it repeatedly asks for my password.

You should be able to get out of this state by deleting the file in the log, /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a or running the command "Kill VS Code Server on Host..."

If it happens again, you might try setting remote.SSH.useFlock.

It worked! I mean I deleted the file. Thank you for the solution.

FYI, the message below still pops up right before the password prompt shows up. It does not seem to do any harm, so far.

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

Source: Remote - SSH (Extension)

Where do you find this file? on mac or ubuntu

In my case, I was remotely logging in Ubuntu.
The output in VSCODE said "/home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a".
"/home/#####" is my home directory and the initial location when I login.

It worked! I mean I deleted the file. Thank you for the solution.

FYI, the message below still pops up right before the password prompt shows up. It does not seem to do any harm, so far.

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

Source: Remote - SSH (Extension)

It worked for me also, but as you mentioned the message comes at the right-bottom end of VS Code Insider.

I believe that this occurs when VScode disconnects in a non-intended way.
This could be circumstantial, but my internet cut out, and then this happened to me.

I would like to add that you need to login as root user to delete this file,

sudo -s

and then

unlink the-file-listed-above-that_they_say_to_delete

so this happened to me again, but this time deleting the file isnt fixing it. The file just reappears, and the issue is back.

Removed the file, but the issue still persists. Tried to remove all entries from the ssh config files on host but of no success

I will add a setting to go back to using flock by default on linux remotes (which has its own issues). I have no clue why this ln strategy is so flaky.

This symptom reproduced in both macOS Catalina 10.15.3 and Windows 10 to connect to a Docker container of Ubuntu 18.04.3 LTS through ssh.
In my case, deleting entire ~/.vscode-server directory after connecting to the container through ssh using terminal worked. (Deleting only ~/.vscode-server/bin did not work.)

The version of VS Code is 1.43.2 (user setup).

This symptom reproduced in both macOS Catalina 10.15.3 and Windows 10 to connect to a Docker container of Ubuntu 18.04.3 LTS through ssh.
In my case, deleting entire ~/.vscode-server directory after connecting to the container through ssh using terminal worked. (Deleting only ~/.vscode-server/bin did not work.)

The version of VS Code is 1.43.2 (user setup).

Having this issue right now with a virtual machine, deleting the folders or using 'Kill VS Code..' either don't work

Same problem here. With mac and vscode 1.45.1. Was hoping to use vscode instead of nano when connecting to a remote ubuntu machine. Will it be fixed soon?

You should be able to get out of this state by deleting the file in the log, /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a or running the command "Kill VS Code Server on Host..."

If it happens again, you might try setting remote.SSH.useFlock.

Running "Kill VS Code Server on Host..." fixed for me 👍

Running "Kill VS Code Server on Host..." fixed for mine too 👍
But if you are using the server with someone else, you need to tell him to save the code he was writing to the vs code :D. We forgot this and lost some code :(

Just to make it clearer, the exact command to run in the command palette (View->Command Palette) is:

Remote-SSH: Kill VS Code Server on Host...

You should be able to get out of this state by deleting the file in the log, /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a or running the command "Kill VS Code Server on Host..."

If it happens again, you might try setting remote.SSH.useFlock.

I quit vscode unintentionally and when I reopened it, it didn't connect with ssh anymore (maybe there was an automatic update) even if the ssh by normal shell worked. I solved it in version 1.46.1 with the command Kill VS Code Server on Host.... Thank you!

I changed the default back to flock for Linux servers which should mitigate this.

Please let me know if anyone continues to see this on a Linux server

@roblourens are there any specific verification steps here? I haven't personally ever run into this issue.

I'm trying to connect to a Ubuntu 14.04 machine from Win10 with VSCode-Insider 1.48.0, and also meet this problem.

I have configured ssh pub keys in that ubuntu machine.

After deleting ~/.vscode-server and re-open vscode-remote, it still asking me password.

I've checked my VSCode setting, remote.SSH.useLocalServer is True.

But with same configuration, I can connect to Ubuntu 16.04 machines.

I also have this problem, but can't find ~/.vscode-server only ~/.vscode Ubuntu 18.04

I believe that this occurs when VScode disconnects in a non-intended way.
This could be circumstantial, but my internet cut out, and then this happened to me.

Same happened here, only removing the lock file worked.

Version: 1.48.1
Commit: 3dd905126b34dcd4de81fa624eb3a8cbe7485f13
Date: 2020-08-19T17:09:41.484Z
Electron: 7.3.2
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.5.0

You should be able to get out of this state by deleting the file in the log, /home/#####/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.#####.78a4c91400152c0f27ba4d363eb56d2835f9903a or running the command "Kill VS Code Server on Host..."

If it happens again, you might try setting remote.SSH.useFlock.

saved my ass

Was this page helpful?
0 / 5 - 0 ratings