Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote SSH password keeps asking password (Installation already in progress) #2518

Closed
vjou opened this issue Mar 10, 2020 · 27 comments
Closed
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug ssh Issue in vscode-remote SSH verified Verification succeeded
Milestone

Comments

@vjou
Copy link

vjou commented Mar 10, 2020

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%
@roblourens
Copy link
Member

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

@roblourens roblourens added the info-needed Issue requires more information from poster label Mar 10, 2020
@vjou
Copy link
Author

vjou commented Mar 10, 2020

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] remote-ssh@0.50.0
[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:03.940] stderr> Authenticated to ##### ([10.192.8.255]:22).
[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.637] stderr> Authenticated to ##### ([10.192.8.255]:22).
[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] ------

@andrewzagorski
Copy link

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.

@roblourens roblourens changed the title Remote SSH password keeps asking password Remote SSH password keeps asking password (Installation already in progress) Mar 11, 2020
@roblourens
Copy link
Member

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.

@roblourens roblourens self-assigned this Mar 11, 2020
@roblourens roblourens added bug Issue identified by VS Code Team member as probable bug ssh Issue in vscode-remote SSH and removed info-needed Issue requires more information from poster labels Mar 11, 2020
@roblourens roblourens added this to the March 2020 milestone Mar 11, 2020
@vjou
Copy link
Author

vjou commented Mar 11, 2020

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)

@vjou vjou closed this as completed Mar 11, 2020
@SharhadBashar
Copy link

Where do you find this file? on mac or ubuntu

@vjou
Copy link
Author

vjou commented Mar 15, 2020

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.

@sayan0020
Copy link

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.

@christopherwalkerml
Copy link

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.

@leeleavitt
Copy link

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

@christopherwalkerml
Copy link

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

@DanBrezeanu
Copy link

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

@roblourens
Copy link
Member

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.

@roblourens roblourens modified the milestones: March 2020, April 2020 Mar 31, 2020
@Minyus
Copy link

Minyus commented Apr 5, 2020

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).

@roblourens roblourens modified the milestones: April 2020, May 2020 Apr 28, 2020
@thecodix
Copy link

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

@kchrs
Copy link

kchrs commented May 31, 2020

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?

@roblourens roblourens modified the milestones: May 2020, June 2020 Jun 2, 2020
@lnogueir
Copy link

lnogueir commented Jun 6, 2020

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 👍

@anemoneflower
Copy link

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 :(

@ameet-1997
Copy link

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...

@paulthemagno
Copy link

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!

@roblourens
Copy link
Member

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

@roblourens roblourens modified the milestones: July 2020, August 2020 Aug 3, 2020
@roblourens
Copy link
Member

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

@roblourens roblourens modified the milestones: August 2020, July 2020 Aug 4, 2020
@connor4312
Copy link
Member

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

@roblourens roblourens added the verified Verification succeeded label Aug 7, 2020
@zchrissirhcz
Copy link

zchrissirhcz commented Aug 11, 2020

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.

@ghost
Copy link

ghost commented Aug 11, 2020

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

@dcharkes
Copy link

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

@shanerbo
Copy link

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

@github-actions github-actions bot locked and limited conversation to collaborators Sep 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug ssh Issue in vscode-remote SSH verified Verification succeeded
Projects
None yet
Development

No branches or pull requests