vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

[Remote-SSH Bug]: Opening VSCode as admin required for connection to host

Open indiano68 opened this issue 3 years ago • 1 comments

Is there an existing issue for this bug?

  • [X] I have searched the existing issues

Required Troubleshooting Steps

  • [X] I have followed these troubleshooting steps
  • [X] I have tried both values of the remote.SSH.useLocalServer setting

Connect Locally

It connects successfully

->

No response

Expected Behavior

I expected remote-ssh to connect to my remote host after entering 2 times the passkey for the rsa-key (my connection involves a proxy jump).

Steps To Reproduce

  1. Open VSCode window on windows
  2. Open Remote-SSH pannel
  3. Click on the hostname
  4. Click on the right-pointing arrow next to my SSH id for the server (read from config)
  5. Input Password for key (Proxy server)
  6. Input Password for key (End Host)
  7. Wait for setup to fail

Remote-SSH Log

Remote-SSH Log

[18:18:28.003] Log Level: 2
[18:18:28.022] VS Code version: 1.84.2
[18:18:28.022] Remote-SSH version: [email protected]
[18:18:28.022] win32 x64
[18:18:28.038] SSH Resolver called for "ssh-remote+fritz", attempt 1
[18:18:28.038] "remote.SSH.useLocalServer": false
[18:18:28.038] "remote.SSH.useExecServer": false
[18:18:28.039] "remote.SSH.showLoginTerminal": false
[18:18:28.039] "remote.SSH.remotePlatform": {"faculty":"linux","fritz":"linux","meggie":"linux"}
[18:18:28.039] "remote.SSH.path": undefined
[18:18:28.039] "remote.SSH.configFile": undefined
[18:18:28.040] "remote.SSH.useFlock": true
[18:18:28.042] "remote.SSH.lockfilesInTmp": false
[18:18:28.042] "remote.SSH.localServerDownload": auto
[18:18:28.042] "remote.SSH.remoteServerListenOnSocket": false
[18:18:28.043] "remote.SSH.showLoginTerminal": false
[18:18:28.043] "remote.SSH.defaultExtensions": []
[18:18:28.043] "remote.SSH.loglevel": 2
[18:18:28.044] "remote.SSH.enableDynamicForwarding": true
[18:18:28.044] "remote.SSH.enableRemoteCommand": false
[18:18:28.044] "remote.SSH.serverPickPortsFromRange": {}
[18:18:28.044] "remote.SSH.serverInstallPath": {}
[18:18:28.051] SSH Resolver called for host: fritz
[18:18:28.051] Setting up SSH remote "fritz"
[18:18:28.057] Using commit id "1a5daa3a0231a0fbba4f14db7ec463cf99d7768e" and quality "stable" for server
[18:18:28.061] Install and start server if needed
[18:18:28.086] Checking ssh with "C:\Program Files (x86)\VMware\VMware Player\bin\ssh.exe -V"
[18:18:28.091] Got error from ssh: spawn C:\Program Files (x86)\VMware\VMware Player\bin\ssh.exe ENOENT
[18:18:28.092] Checking ssh with "D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\ssh.exe -V"
[18:18:28.094] Got error from ssh: spawn D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\bin\ssh.exe ENOENT
[18:18:28.094] Checking ssh with "D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp\ssh.exe -V"
[18:18:28.096] Got error from ssh: spawn D:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\libnvvp\ssh.exe ENOENT
[18:18:28.096] Checking ssh with "C:\Program Files (x86)\Razer Chroma SDK\bin\ssh.exe -V"
[18:18:28.098] Got error from ssh: spawn C:\Program Files (x86)\Razer Chroma SDK\bin\ssh.exe ENOENT
[18:18:28.099] Checking ssh with "C:\Program Files\Razer Chroma SDK\bin\ssh.exe -V"
[18:18:28.102] Got error from ssh: spawn C:\Program Files\Razer Chroma SDK\bin\ssh.exe ENOENT
[18:18:28.102] Checking ssh with "C:\Program Files (x86)\Razer\ChromaBroadcast\bin\ssh.exe -V"
[18:18:28.104] Got error from ssh: spawn C:\Program Files (x86)\Razer\ChromaBroadcast\bin\ssh.exe ENOENT
[18:18:28.105] Checking ssh with "C:\Program Files\Razer\ChromaBroadcast\bin\ssh.exe -V"
[18:18:28.107] Got error from ssh: spawn C:\Program Files\Razer\ChromaBroadcast\bin\ssh.exe ENOENT
[18:18:28.107] Checking ssh with "C:\WinAVR-20100110\bin\ssh.exe -V"
[18:18:28.110] Got error from ssh: spawn C:\WinAVR-20100110\bin\ssh.exe ENOENT
[18:18:28.110] Checking ssh with "C:\WinAVR-20100110\utils\bin\ssh.exe -V"
[18:18:28.113] Got error from ssh: spawn C:\WinAVR-20100110\utils\bin\ssh.exe ENOENT
[18:18:28.113] Checking ssh with "C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\ssh.exe -V"
[18:18:28.115] Got error from ssh: spawn C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\ssh.exe ENOENT
[18:18:28.116] Checking ssh with "C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\ssh.exe -V"
[18:18:28.118] Got error from ssh: spawn C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\ssh.exe ENOENT
[18:18:28.119] Checking ssh with "C:\Windows\system32\ssh.exe -V"
[18:18:28.121] Got error from ssh: spawn C:\Windows\system32\ssh.exe ENOENT
[18:18:28.122] Checking ssh with "C:\Windows\ssh.exe -V"
[18:18:28.125] Got error from ssh: spawn C:\Windows\ssh.exe ENOENT
[18:18:28.125] Checking ssh with "C:\Windows\System32\Wbem\ssh.exe -V"
[18:18:28.127] Got error from ssh: spawn C:\Windows\System32\Wbem\ssh.exe ENOENT
[18:18:28.127] Checking ssh with "C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe -V"
[18:18:28.129] Got error from ssh: spawn C:\Windows\System32\WindowsPowerShell\v1.0\ssh.exe ENOENT
[18:18:28.129] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[18:18:28.177] > OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3

[18:18:28.182] Running script with connection command: "C:\Windows\System32\OpenSSH\ssh.exe" -T -D 52084 fritz bash
[18:18:28.187] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[18:18:28.637] > Access is denied.
> ]0;C:\WINDOWS\System32\cmd.exe
[18:18:28.637] Got some output, clearing connection timeout
[18:18:28.653] > Enter passphrase for key 'C:\Users\erikf\.ssh\id_rsa': 
[18:18:28.654] Detected passphrase message
[18:18:53.268] Got passphrase response
[18:18:53.268] "install" wrote data to terminal: "*************"
[18:18:53.299] > 
[18:18:54.828] > Enter passphrase for key 'C:\Users\erikf\.ssh\id_rsa': 
[18:18:54.828] Detected passphrase message
[18:18:58.734] Got passphrase response
[18:18:58.735] "install" wrote data to terminal: "*************"
[18:18:58.770] > 
[18:19:00.305] "install" terminal command done
[18:19:00.306] User entered passphrase
[18:19:00.308] Passphrase was entered and ssh config entry was found - adding SSH key to agent
[18:19:00.310] Executing add-ssh-key:
powershell -ExecutionPolicy Bypass C:\WINDOWS\TEMP\vscode_add_ssh_key_to_agent.ps1
[18:19:00.310] Terminal shell path: C:\WINDOWS\System32\cmd.exe
[18:19:00.311] "add-ssh-key" wrote data to terminal: "powershell -ExecutionPolicy Bypass C:\WINDOWS\TEMP\vscode_add_ssh_key_to_agent.ps1"
[18:19:00.712] > Microsoft Windows [Version 10.0.22621.2428]
> (c) Microsoft Corporation. All rights reserved.C:\Users\erikf>]0;C:\WINDOWS\System32\cmd.exe
[18:19:00.730] > (powershell -ExecutionPolicy Bypass C:\WINDOWS\TEMP\vscode_add_ssh_key_to_agent.ps1) & exit /b 0
> ]0;C:\WINDOWS\System32\cmd.exe - powershell  -ExecutionPolicy Bypass C:\WINDOWS\TEMP\vscode_add_ssh_key_to_agent.ps1
[18:19:01.017] > PS: adding key to ssh-agent
> ssh-add
> C:\Users\erikf\.ssh\id_rsa
[18:19:01.034] > Error connecting to agent: No such file 
[18:19:01.047] > or directory
> b2b2db2f2680##5##
[18:19:01.048] ssh-add failed
[18:19:01.048] Consider setting up the ssh agent: https://aka.ms/vscode-remote/troubleshooting#_setting-up-the-ssh-agent
[18:19:01.065] > ]0;C:\WINDOWS\System32\cmd.exe
[18:19:01.065] ssh-add failed
[18:19:01.065] Consider setting up the ssh agent: https://aka.ms/vscode-remote/troubleshooting#_setting-up-the-ssh-agent
[18:19:02.332] "add-ssh-key" terminal command done
[18:19:02.333] Install terminal quit with output: 
[18:19:02.336] Resolver error: Error: Got bad result from install script
	at g.Create (c:\Users\erikf\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.0\out\extension.js:2:642290)
	at t.tryInstall (c:\Users\erikf\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.0\out\extension.js:2:761372)
	at async c:\Users\erikf\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.0\out\extension.js:2:722175
	at async t.withShowDetailsEvent (c:\Users\erikf\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.0\out\extension.js:2:725481)
	at async I (c:\Users\erikf\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.0\out\extension.js:2:719146)
	at async t.resolve (c:\Users\erikf\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.0\out\extension.js:2:722852)
	at async c:\Users\erikf\.vscode\extensions\ms-vscode-remote.remote-ssh-0.107.0\out\extension.js:2:906656
[18:19:02.346] ------

Anything else?

If I open vscode as admin on windows, Remote-SSH works as usual.

indiano68 avatar Nov 16 '23 17:11 indiano68

It was my fault, it failed downloading the server to the temp directory as it did not have access

indiano68 avatar Nov 21 '23 16:11 indiano68