Vscode: SSH remote not working in 1.43

Created on 10 Mar 2020  路  25Comments  路  Source: microsoft/vscode



  • VSCode Version: 1.43
  • OS Version: Windows 10 1903

Steps to Reproduce:

  1. Update from VSCode 1.42.1 to 1.43
  2. Connect to a remote host through its alias declared in %UserProfile%/.ssh/config

Expected behavior: An SSH session can be established to the remote machine.
Behavior in reality: VSCode cannot connect, throwing "cannot resolve hostname" error. The problem can be partly mitigated by putting the IP address in etc/hosts, however settings (like IdentityFile in .ssh/config) are not respected.

EDIT: downgrade the Remote - SSH plugin to version 0.49.0 helped.

EDIT 2: official recommended workaround: set remote.SSH.useLocalServer to false on version 0.50.0
Some other things you can try:

  • Keep localServer on and configure remote.SSH.path to C:\Windows\System32\OpenSSH\ssh.exe

If nothing works for you, try other workarounds in this ticket or the other ticket

needs more info

Most helpful comment

@tiptronic85 you can try downgrade the extension Remote - SSH version to 0.49.0, that worked for me. VSCode 1.43 automatically updated the extension to version 0.50.0.

All 25 comments

Same for me, this morning i updated from 1.42 to 1.43 and now SSH does not work.

Another annoying issue is that when it loses connection with SSH i have to re-open all tabs again and again

@tiptronic85 you can try downgrade the extension Remote - SSH version to 0.49.0, that worked for me. VSCode 1.43 automatically updated the extension to version 0.50.0.

I have another problem, sometimes when it loses connection, all tabs were closed.
Do you have the same problem? Any hint?

I got the following in the output panel when trying to connect from Mac to Linux with version 0.50.0 of Remote - SSH:

[10:21:57.782] stderr> bash: line 1: syntax error near unexpected token `then'
[10:21:57.782] stderr> bash: line 1: `then'
[10:21:57.782] stderr> function: Command not found.
[10:21:57.783] stderr> COMMIT_ID=78a4c91400152c0f27ba4d363eb56d2835f9903a: Command not found.
[10:21:57.783] > 4f0acc8d1184: running
[10:21:57.783] stderr> EXTENSIONS=: Command not found.
[10:21:57.783] stderr> TELEMETRY=: Command not found.
[10:21:57.784] stderr> export: Command not found.
[10:21:57.784] stderr> ALLOW_CLIENT_DOWNLOAD=1: Command not found.
[10:21:57.784] stderr> VSCODE_AGENT_FOLDER: Undefined variable.
[10:21:57.785] stderr> _lock: Command not found.

VS Code was just hanging doing nothing. Going back to Remote - SSH 0.49.0 solved this for me too.

Edit:
In the light of what radcool has found (https://github.com/microsoft/vscode/issues/92331#issuecomment-597340644) I should probably mention that my default shell is tcsh.

In my case Vscode was complaining about ssh key being incorrect format, then prompting for password. After entering pass, it connected and in logs I saw the motd from server. Then it complained about not being able to create symlink and disconnected.

Downgrading plugin fixed the issue (thanks @tgquan67, you saved my life ;) ).

In my case downgrading plugin did not help. I use my plugin for connection with Raspbian.

@przemo1983 it's a bit messy, but you can try open a local window of VSCode, uninstall Remote - SSH extension, then install VSCode version 1.42.1. After that reinstall the extension. That also worked for me.
@tiptronic85 I have never been disconnected in the middle of a session, just when I connect to a server without turning the server on first, it will throw an error, and if I choose to close the window instead of retrying next time I connect I will lose all tabs of that workspace. It has always been like that for me, so maybe you will need to open an other ticket to request that feature (save workspace state even when connection fails, or something similar).

@tgquan67 your workaround works for me. thank you!

We experience the same issue in our company. The investigation is quite a setback. The first stderr lines are bash related

[14:20:16.943] stderr> bash: line 1: ons: command not found
[14:20:16.943] stderr> bash: line 8: syntax error near unexpected token `else'
[14:20:16.943] stderr> bash: line 8: `else'

Maybe some script broke?

We can confirm that reverting the Remote SSH extension to 0.49 is enough, no need to downgrade VS Code itself, no need to delete anything.

image

EDIT:
I created an issue in the remote extensions repo too: https://github.com/microsoft/vscode-remote-release/issues/2513

The new version of the extension seems to completly ignore the config file. I use a different username and I overwrite sometimes the hostname and it doesn't recognize it anymore.

Furthermore it seems that doesn't use the Windows 10 ssh agent... this worked previously.

I found that you can delete the vscode-server on your remote machine. My remote machine is linux. It will start work again aftern the vscode install the server on the remote machine.

Can someone share the full log from the Remote-SSH output channel? And, are you using a non-bash shell on the remote?

As a workaround, disabling the "useLocalServer" setting for ssh might help.

@roblourens My setup: Windows 10 with ssh installed connecting to VM with ubuntu 19.10 using private key (all defined in ssh config file with some port forwarding).

ssh -V
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[19:18:13.786] Log Level: 2
[19:18:13.799] [email protected]
[19:18:13.799] win32 x64
[19:18:13.801] SSH Resolver called for "ssh-remote+vm", attempt 1
[19:18:13.802] SSH Resolver called for host: vm
[19:18:13.802] Setting up SSH remote "vm"
[19:18:13.812] Acquiring local install lock: C:\Users\kamil\AppData\Local\Temp\vscode-remote-ssh-vm-install.lock
[19:18:13.866] Looking for existing server data file at c:\Users\kamil\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-vm-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[19:18:13.868] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[19:18:13.871] Install and start server if needed
[19:18:13.877] Checking ssh with "ssh -V"
[19:18:13.935] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[19:18:13.937] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[19:18:14.000] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[19:18:14.001] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[19:18:14.344] > OpenSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019
[19:18:14.348] askpass server listening on \\.\pipe\vscode-ssh-askpass-94183a2b2b502d02aac1af1225a0e301de4a6ff6-sock
[19:18:14.348] Spawning local server with {"ipcHandlePath":"\\\\.\\pipe\\vscode-ssh-askpass-9213ae1fa89fa238eff2eae41e74b71ac3352917-sock","sshCommand":"C:\\Program Files\\Git\\usr\\bin\\ssh.exe","sshArgs":["-v","-T","-D","8425","vm"],"dataFilePath":"c:\\Users\\kamil\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-vscode-remote.remote-ssh\\vscode-ssh-host-vm-78a4c91400152c0f27ba4d363eb56d2835f9903a\\data.json"}
[19:18:14.349] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\\Users\\kamil\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\local-server\\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\\Users\\kamil\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\\Users\\kamil\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\\\.\\pipe\\vscode-ssh-askpass-94183a2b2b502d02aac1af1225a0e301de4a6ff6-sock"}
[19:18:14.360] Spawned 10940
[19:18:14.554] > local-server> Spawned ssh: 5468
[19:18:14.610] stderr> OpenSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019
[19:18:14.711] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:NP/QiZC47rRsObIzn4MZeQxs2jCqibJhpnFZnB3DUlY
[19:18:14.780] stderr> Load key "C:\\Users\\kamil\\.ssh\\id_rsa_vm": invalid format
[19:18:15.032] Got askpass request: {"request":"[email protected]'s password: "}
[19:18:15.033] Showing password prompt
[19:18:15.036] Listening for interwindow password on \\.\pipe\vscode-ssh-askpass-49915231c5f2237c1325a1f44544ed62f4bc6113-sock
[19:18:15.036] Writing password prompt to globalState
[19:18:25.400] Got password response
[19:18:25.401] Interactor gave response: *******
[19:18:25.402] Cleaning up other-window auth server
[19:18:25.475] stderr> Authenticated to 192.168.1.70 ([192.168.1.70]:22).
[19:18:25.480] stderr> bind [::1]:8080: Address already in use
[19:18:25.480] stderr> bind [127.0.0.1]:8080: Address already in use
[19:18:25.480] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 8080
[19:18:25.481] stderr> bind [::1]:1080: Address already in use
[19:18:25.481] stderr> bind [127.0.0.1]:1080: Address already in use
[19:18:25.481] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 1080
[19:18:25.482] stderr> bind [::1]:3000: Address already in use
[19:18:25.482] stderr> bind [127.0.0.1]:3000: Address already in use
[19:18:25.482] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 3000
[19:18:25.483] stderr> bind [::1]:1080: Address already in use
[19:18:25.483] stderr> bind [127.0.0.1]:1080: Address already in use
[19:18:25.483] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 1080
[19:18:25.483] stderr> bind [::1]:2080: Address already in use
[19:18:25.484] stderr> bind [127.0.0.1]:2080: Address already in use
[19:18:25.485] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 2080
[19:18:26.164] > Welcome to Ubuntu 19.10 (GNU/Linux 5.3.0-40-generic x86_64)
> 
>  * Documentation:  https://help.ubuntu.com
>  * Management:     https://landscape.canonical.com
>  * Support:        https://ubuntu.com/advantage
> 
>   System information as of Tue 10 Mar 2020 06:18:25 PM UTC
> 
>   System load:                    0.06
>   Usage of /:                     74.4% of 97.93GB
>   Memory usage:                   62%
>   Swap usage:                     0%
>   Processes:                      328
>   Users logged in:                1
>   IP address for ens33:           192.168.30.128
>   IP address for docker0:         172.17.0.1
>   IP address for br-6c78fe65ed7c: 172.18.0.1
> 
> 
> 0 updates can be installed immediately.
> 0 of these updates are security updates.
> 
[19:18:26.206] > ready: 1a8ceda0087d
[19:18:26.213] > Linux 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020
[19:18:26.214] Platform: linux
[19:18:26.238] > 1a8ceda0087d: running
[19:18:26.283] > Acquiring lock on /home/hell/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.hell.78a4c91400152c0f27ba4d363eb56d2835f9903a
> \ln /home/hell/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.hell.78a4c91400152c0f27ba4d363eb56d2835f9903a.target /home/hell/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.hell.78a4c91400152c0f27ba4d363eb56d2835f9903a
> Installation already in progress...
> 1a8ceda0087d##24##
[19:18:26.283] Received install output: 1a8ceda0087d##24##
[19:18:26.284] Server installation process already in progress - waiting and retrying
[19:18:26.284] Terminating local server
[19:18:26.285] stderr> ln: failed to create hard link '/home/hell/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.hell.78a4c91400152c0f27ba4d363eb56d2835f9903a': File exists
[19:18:26.298] Local server exit: null
[19:18:27.292] askpass server listening on \\.\pipe\vscode-ssh-askpass-7c1c753b57092f57f90452f356c656f90e49e3c9-sock
[19:18:27.293] Spawning local server with {"ipcHandlePath":"\\\\.\\pipe\\vscode-ssh-askpass-bf6463a6a9b78fdd47ccd952d8c92a4ee2bae94e-sock","sshCommand":"C:\\Program Files\\Git\\usr\\bin\\ssh.exe","sshArgs":["-v","-T","-D","8425","vm"],"dataFilePath":"c:\\Users\\kamil\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-vscode-remote.remote-ssh\\vscode-ssh-host-vm-78a4c91400152c0f27ba4d363eb56d2835f9903a\\data.json"}
[19:18:27.293] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\\Users\\kamil\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\local-server\\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\\Users\\kamil\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\\Users\\kamil\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\\\.\\pipe\\vscode-ssh-askpass-7c1c753b57092f57f90452f356c656f90e49e3c9-sock"}
[19:18:27.303] Spawned 2332
[19:18:27.470] > local-server> Spawned ssh: 2124
[19:18:27.539] stderr> OpenSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019
[19:18:27.650] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:NP/QiZC47rRsObIzn4MZeQxs2jCqibJhpnFZnB3DUlY
[19:18:27.716] stderr> Load key "C:\\Users\\kamil\\.ssh\\id_rsa_vm": invalid format
[19:18:27.933] Got askpass request: {"request":"[email protected]'s password: "}
[19:18:27.934] Showing password prompt
[19:18:27.934] Listening for interwindow password on \\.\pipe\vscode-ssh-askpass-ea23eb8453edbe7dabfda6d64e3dea11301dc2d1-sock
[19:18:27.934] Writing password prompt to globalState
[19:18:31.595] Got password response
[19:18:31.596] Interactor gave response: *******
[19:18:31.596] Cleaning up other-window auth server
[19:18:31.652] stderr> Authenticated to 192.168.1.70 ([192.168.1.70]:22).
[19:18:31.655] stderr> bind [::1]:8080: Address already in use
[19:18:31.656] stderr> bind [127.0.0.1]:8080: Address already in use
[19:18:31.656] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 8080
[19:18:31.658] stderr> bind [::1]:1080: Address already in use
[19:18:31.659] stderr> bind [127.0.0.1]:1080: Address already in use
[19:18:31.659] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 1080
[19:18:31.663] stderr> bind [::1]:3000: Address already in use
[19:18:31.663] stderr> bind [127.0.0.1]:3000: Address already in use
[19:18:31.664] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 3000
[19:18:31.664] stderr> bind [::1]:1080: Address already in use
[19:18:31.664] stderr> bind [127.0.0.1]:1080: Address already in use
[19:18:31.664] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 1080
[19:18:31.665] stderr> bind [::1]:2080: Address already in use
[19:18:31.666] stderr> bind [127.0.0.1]:2080: Address already in use
[19:18:31.666] stderr> channel_setup_fwd_listener_tcpip: cannot listen to port: 2080
[19:18:32.129] > Welcome to Ubuntu 19.10 (GNU/Linux 5.3.0-40-generic x86_64)
> 
>  * Documentation:  https://help.ubuntu.com
>  * Management:     https://landscape.canonical.com
>  * Support:        https://ubuntu.com/advantage
> 
>   System information as of Tue 10 Mar 2020 06:18:31 PM UTC
> 
>   System load:                    0.05
>   Usage of /:                     74.4% of 97.93GB
>   Memory usage:                   62%
>   Swap usage:                     0%
>   Processes:                      327
>   Users logged in:                1
>   IP address for ens33:           192.168.30.128
>   IP address for docker0:         172.17.0.1
>   IP address for br-6c78fe65ed7c: 172.18.0.1
> 
> 
> 0 updates can be installed immediately.
> 0 of these updates are security updates.
> 
[19:18:32.176] > ready: 1a8ceda0087d
[19:18:32.187] > Linux 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020
[19:18:32.188] Platform: linux
[19:18:32.206] > 1a8ceda0087d: running
[19:18:32.250] > Acquiring lock on /home/hell/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.hell.78a4c91400152c0f27ba4d363eb56d2835f9903a
> \ln /home/hell/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.hell.78a4c91400152c0f27ba4d363eb56d2835f9903a.target /home/hell/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.hell.78a4c91400152c0f27ba4d363eb56d2835f9903a
> Installation already in progress...
> 1a8ceda0087d##24##
[19:18:32.250] Received install output: 1a8ceda0087d##24##
[19:18:32.251] Server installation process already in progress - waiting and retrying
[19:18:32.251] Terminating local server
[19:18:32.252] stderr> ln: failed to create hard link '/home/hell/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d2835f9903a/vscode-remote-lock.hell.78a4c91400152c0f27ba4d363eb56d2835f9903a': File exists
[19:18:32.264] Local server exit: null
[19:18:33.262] askpass server listening on \\.\pipe\vscode-ssh-askpass-abcbc7a22ee6e0064f281004aedc7e4f9dcb9ab5-sock
[19:18:33.263] Spawning local server with {"ipcHandlePath":"\\\\.\\pipe\\vscode-ssh-askpass-04bd73b35a391570976e1b03b559a22cdf434e54-sock","sshCommand":"C:\\Program Files\\Git\\usr\\bin\\ssh.exe","sshArgs":["-v","-T","-D","8425","vm"],"dataFilePath":"c:\\Users\\kamil\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-vscode-remote.remote-ssh\\vscode-ssh-host-vm-78a4c91400152c0f27ba4d363eb56d2835f9903a\\data.json"}
[19:18:33.263] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\\Users\\kamil\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\local-server\\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\\Users\\kamil\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\\Users\\kamil\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\\\.\\pipe\\vscode-ssh-askpass-abcbc7a22ee6e0064f281004aedc7e4f9dcb9ab5-sock"}
[19:18:33.272] Spawned 9408
[19:18:33.443] > local-server> Spawned ssh: 9956
[19:18:33.508] stderr> OpenSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019
[19:18:33.581] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:NP/QiZC47rRsObIzn4MZeQxs2jCqibJhpnFZnB3DUlY
[19:18:33.650] stderr> Load key "C:\\Users\\kamil\\.ssh\\id_rsa_vm": invalid format
[19:18:33.880] Got askpass request: {"request":"[email protected]'s password: "}
[19:18:33.881] Showing password prompt
[19:18:33.882] Listening for interwindow password on \\.\pipe\vscode-ssh-askpass-b01c270fc0d89b5c7791f556b9bf2ea29745d07a-sock
[19:18:33.882] Writing password prompt to globalState

In this log I entered password twice, since on vm I have both private key and password as an auth enabled.

This is the log when I use extension version 0.50.0, right after updating:

[21:22:44.626] Log Level: 2
[21:22:44.627] [email protected]
[21:22:44.627] win32 x64
[21:22:44.628] SSH Resolver called for "ssh-remote+work_ubuntu", attempt 1
[21:22:44.628] SSH Resolver called for host: work_ubuntu
[21:22:44.628] Setting up SSH remote "work_ubuntu"
[21:22:44.631] Acquiring local install lock: C:\Users\me\AppData\Local\Temp\vscode-remote-ssh-work_ubuntu-install.lock
[21:22:44.642] Looking for existing server data file at c:\Users\me\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-work_ubuntu-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[21:22:44.643] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[21:22:44.644] Install and start server if needed
[21:22:44.658] Checking ssh with "ssh -V"
[21:22:44.692] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[21:22:44.693] Checking ssh with "C:\Windows\System32\OpenSSH\ssh.exe -V"
[21:22:44.725] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[21:22:44.725] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[21:22:44.836] > OpenSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019
[21:22:44.844] askpass server listening on \\.\pipe\vscode-ssh-askpass-fee0b72d2347ecb32ed17dec24eb0dbc3046caf8-sock
[21:22:44.844] Spawning local server with {"ipcHandlePath":"\\\\.\\pipe\\vscode-ssh-askpass-7097648ae0f5921695f165e2c13a01bd5dea32d0-sock","sshCommand":"C:\\Program Files\\Git\\usr\\bin\\ssh.exe","sshArgs":["-v","-T","-D","58744","work_ubuntu"],"dataFilePath":"c:\\Users\\me\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-vscode-remote.remote-ssh\\vscode-ssh-host-work_ubuntu-78a4c91400152c0f27ba4d363eb56d2835f9903a\\data.json"}
[21:22:44.844] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\\Users\\me\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\local-server\\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\\Users\\me\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\\Users\\me\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\\\.\\pipe\\vscode-ssh-askpass-fee0b72d2347ecb32ed17dec24eb0dbc3046caf8-sock"}
[21:22:44.851] Spawned 11332
[21:22:44.939] > local-server> Spawned ssh: 10160
[21:22:44.977] stderr> OpenSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019
[21:22:47.264] stderr> ssh: Could not resolve hostname work_ubuntu: Name or service not known
[21:22:47.267] > local-server> ssh child died, shutting down
[21:22:47.281] Local server exit: 0
[21:22:47.281] Received install output: OpenSSH_8.1p1, OpenSSL 1.1.1d  10 Sep 2019
ssh: Could not resolve hostname work_ubuntu: Name or service not known

[21:22:47.283] Resolver error: Could not resolve hostname
[21:22:47.292] ------

And this is the log when I use version 0.49.0

[21:21:48.296] Log Level: 3
[21:21:48.296] [email protected]
[21:21:48.296] win32 x64
[21:21:48.297] SSH Resolver called for "ssh-remote+work_ubuntu", attempt 1
[21:21:48.297] SSH Resolver called for host: work_ubuntu
[21:21:48.297] Setting up SSH remote "work_ubuntu"
[21:21:48.303] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[21:21:48.304] Install and start server if needed
[21:21:48.329] Checking ssh with "ssh -V"
[21:21:48.376] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[21:21:48.377] Running script with connection command: ssh -T -D 58716 work_ubuntu bash
[21:21:48.379] Terminal shell path: C:\Windows\System32\cmd.exe
[21:21:48.424] > 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ]0;C:\Windows\System32\cmd.exe
[21:21:48.424] Got some output, clearing connection timeout
[21:21:48.430] > 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
[21:21:48.565] > warning: agent returned different signature type ssh-rsa (expected rsa-sha2-512)
[21:21:49.068] > 3283cd3a0d80: running
> 
[21:21:49.102] > Acquiring lock on /home/me/.vscode-server/bin/78a4c91400152c0f27ba4d363eb56d28
> 35f9903a/vscode-remote-lock.me.78a4c91400152c0f27ba4d363eb56d2835f9903a       
> 
[21:21:49.110] > Found existing installation at /home/me/.vscode-server/bin/78a4c91400152c0f27b
> a4d363eb56d2835f9903a...
> 
[21:21:49.126] > LC_MEASUREMENT=en_GB.UTF-8
> SSH_CONNECTION=192.168.56.1 58717 192.168.56.101 22
> LC_PAPER=en_GB.UTF-8
> LC_MONETARY=en_GB.UTF-8
> LANG=en_US.UTF-8
> SSH_AUTH_SOCK=/tmp/ssh-aE2sA2f5wX/agent.2393       
> LC_NAME=en_GB.UTF-8
> XDG_SESSION_ID=3
> USER=me
> PWD=/home/me
> HOME=/home/me
> SSH_CLIENT=192.168.56.1 58717 22
> LC_ADDRESS=en_GB.UTF-8
> LC_NUMERIC=en_GB.UTF-8
> MAIL=/var/mail/me
> PAPERSIZE=a4
> SHELL=/bin/bash
> SHLVL=2
> LC_TELEPHONE=en_GB.UTF-8
> VSCODE_AGENT_FOLDER=/home/me/.vscode-server
> LOGNAME=me
> DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
> XDG_RUNTIME_DIR=/run/user/1000
> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/us
> r/local/games
> LC_IDENTIFICATION=en_GB.UTF-8
> LC_TIME=en_GB.UTF-8
> _=/usr/bin/printenv
> Starting server...
> Waiting for server log...
[21:21:49.139] > 
> 
[21:21:49.639] >  
> *
> * Reminder: You may only use this software with Visual Studio family products,
> * as described in the license (https://go.microsoft.com/fwlink/?linkid=2077057) 
> *
> 
[21:21:49.649] > 
> 
[21:21:49.665] > 3283cd3a0d80: start
> sshAuthSock==/tmp/ssh-aE2sA2f5wX/agent.2393==
> agentPort==38795==
> osReleaseId==ubuntu==
> arch==x86_64==
> webUiAccessToken====
> tmpDir==/run/user/1000==
> 3283cd3a0d80: end
[21:21:49.666] Received install output: 
sshAuthSock==/tmp/ssh-aE2sA2f5wX/agent.2393==
agentPort==38795==
osReleaseId==ubuntu==
arch==x86_64==
webUiAccessToken====
tmpDir==/run/user/1000==

[21:21:49.666] Remote server is listening on port 38795
[21:21:49.666] Parsed server configuration: {"agentPort":38795,"osReleaseId":"ubuntu","arch":"x86_64","webUiAccessToken":"","sshAuthSock":"/tmp/ssh-aE2sA2f5wX/agent.2393","tmpDir":"/run/user/1000"}
[21:21:49.667] Starting forwarding server. localPort 58720 -> socksPort 58716 -> remotePort 38795
[21:21:49.668] Forwarding server listening on 58720
[21:21:49.669] Waiting for ssh tunnel to be ready
[21:21:49.674] [Forwarding server 58720] Got connection 0
[21:21:49.677] Tunneled remote port 38795 to local port 58720
[21:21:49.678] Resolved "ssh-remote+work_ubuntu" to "127.0.0.1:58720"
[21:21:49.680] Updating $SSH_AUTH_SOCK: ln -f -s "/tmp/ssh-aE2sA2f5wX/agent.2393" "/run/user/1000/vscode-ssh-auth-sock-852735657"
[21:21:49.681] Using cwd: vscode-remote://ssh-remote%2Bwork_ubuntu/
[21:21:49.681] Remote extension host environment: {"SSH_AUTH_SOCK":"/run/user/1000/vscode-ssh-auth-sock-852735657"}
[21:21:49.683] > 
> 
[21:21:49.693] ------




[21:21:49.705] [Forwarding server 58720] Got connection 1
[21:21:49.706] [Forwarding server 58720] Got connection 2
[21:21:50.160] [Forwarding server 58720] Got connection 3
[21:21:50.161] [Forwarding server 58720] Got connection 4
[21:21:50.161] [Forwarding server 58720] Got connection 5
[21:21:50.989] "Update SSH_AUTH_SOCK" terminal command done

Can confirm that downgrading Remote - SSH to 0.49.0 worked for me, too.

If I read the release notes right on 1.4.3, Remote SSH has changed the default of option remote.SSH.useLocalServer to true. It appears that this option, combined with a connection to an SSH server and user where the default shell is either 1) not BASH, 2) or is FISH (my case), the connection establishment hangs indefinitely.

Setting remote.SSH.useLocalServer to false OR setting the default shell to BASH resolves the issue. So the problem likely has to do with the interaction between the Local Server mode and FISH (perhaps shells other than BASH also have this issue).

@radcool you are right, changing it to false did the trick. I totally missed the changelog of remote development 1.43.
From what I can see in my case, somehow the local server used the SSH client bundled with Git instead of Windows' SSH client, and totally missed the SSH config file.

Recommended workaround for now - disable remote.SSH.useLocalServer as described above. Tomorrow morning I will push out an update reverting the change to enable that by default.

@radcool Thanks! I can confirm that setting remote.SSH.useLocalServer set to false worked for me too. I have default shell TCSH and that in combination with remote.SSH.useLocalServer set to true does not work.

Setting remote.SSH.useLocalServer to false did not work in my case. Only fix was reverting Remote SSH and Remote SSH edit to version 0.49. Hopefully this can be fixed.

Closing this - I am still planning on disabling useLocalServer by default on Windows, but I need to work on the experience a bit first. Sorry for the trouble and delay. @neurosylvia please open another issue with the log from the Remote-SSH output channel and I can help you diagnose it.

@roblourens FYI You mentioned you planning to change the default for useLocalServer _on Windows_, but note that I had to set remote.SSH.useLocalServer to false on my VS Code running on Fedora 31 as well to work around the problem.

Can someone explain why enabling remote.SSH.useLocalServer makes VS Code choose the SSH executable in Git for Windows rather than that in %WINDIR%\System32\OpenSSH ?

To work around a bug in the Windows OpenSSH which causes us to show empty password prompts (with no prompt message)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sijad picture sijad  路  3Comments

philipgiuliani picture philipgiuliani  路  3Comments

v-pavanp picture v-pavanp  路  3Comments

curtw picture curtw  路  3Comments

lukehoban picture lukehoban  路  3Comments