Since the latest VS Code update we can't connect to our remote server
This has been reported to the main vscode repo
https://github.com/microsoft/vscode/issues/92331
When I reverted the SSH extension back to 0.49 I could connect to the remote again

Could you share the log from the Remote-SSH output channel when trying to connect with 0.50?
I can connect, but the ssh agent forwarding stopped working. Reverting to 0.49 fixed it.
Same here, but I've a clue: I noticed that it works using bash as default shell, and it's not working when using some other shell (at least fish and tcsh).
VSCode Version: 1.43
Local OS Version: mac OS 10.13.6
Remote OS Version: Ubuntu 16.04
Remote Extension/Connection Type: SSH
Extension version: 0.50
Switching the default shell with:
chsh -s /bin/bash => it (re)works
chsh -s /usr/bin/fish => error (disconnect, no-reason, and then time-out)
Nothing interresting in the logs.
Console logs:
[18:39:11.291] Terminating local server
[18:39:11.292] Resolver error: Connecting with SSH timed out
[18:39:11.295] ------
[18:39:11.296] Local server exit: 15
Server logs:
Mar 10 18:38:54 sp1 sshd[10586]: Accepted publickey for tux from X.Y.Z.A port 23652 ssh2: RSA SHA256:xxx/yyyyy
Mar 10 18:38:54 sp1 sshd[10586]: pam_unix(sshd:session): session opened for user tux by (uid=0)
Mar 10 18:38:54 sp1 systemd-logind[938]: New session 110300 of user tux.
Mar 10 18:39:11 sp1 sshd[10614]: Received disconnect from X.Y.Z.A port 23652:11: disconnected by user
Mar 10 18:39:11 sp1 sshd[10614]: Disconnected from X.Y.Z.A port 23652
Mar 10 18:39:11 sp1 sshd[10586]: pam_unix(sshd:session): session closed for user tux
Mar 10 18:39:11 sp1 systemd-logind[938]: Removed session 110300.
"remote.SSH.useLocalServer": false for 0.50 works
Logs with version 0.50
[02:47:01.097] Log Level: 2
[02:47:01.102] [email protected]
[02:47:01.103] win32 x64
[02:47:01.105] SSH Resolver called for "ssh-remote+remote-workspace-2703-44203", attempt 1
[02:47:01.106] SSH Resolver called for host: remote-workspace-2703-44203
[02:47:01.106] Setting up SSH remote "remote-workspace-2703-44203"
[02:47:01.114] Acquiring local install lock: C:\Users\VILICV~1\AppData\Local\Temp\vscode-remote-ssh-remote-workspace-2703-44203-install.lock
[02:47:01.159] Looking for existing server data file at c:\Users\vilicvane\AppData\Roaming\Code\User\globalStorage\ms-vscode-remote.remote-ssh\vscode-ssh-host-remote-workspace-2703-44203-78a4c91400152c0f27ba4d363eb56d2835f9903a\data.json
[02:47:01.161] Using commit id "78a4c91400152c0f27ba4d363eb56d2835f9903a" and quality "stable" for server
[02:47:01.163] Install and start server if needed
[02:47:01.174] Checking ssh with "ssh -V"
[02:47:01.241] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[02:47:01.241] Checking ssh with "C:\WINDOWS\System32\OpenSSH\ssh.exe -V"
[02:47:01.290] > OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
[02:47:01.291] Checking ssh with "C:\Program Files\Git\usr\bin\ssh.exe -V"
[02:47:01.346] > OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[02:47:01.351] askpass server listening on \\.\pipe\vscode-ssh-askpass-cf756a078da983c2815482214cc6885085d3daf3-sock
[02:47:01.351] Spawning local server with {"ipcHandlePath":"\\\\.\\pipe\\vscode-ssh-askpass-d08884368f2f978927b993ea00d96d209baa89a8-sock","sshCommand":"C:\\Program Files\\Git\\usr\\bin\\ssh.exe","sshArgs":["-v","-T","-D","54584","remote-workspace-2703-44203"],"dataFilePath":"c:\\Users\\vilicvane\\AppData\\Roaming\\Code\\User\\globalStorage\\ms-vscode-remote.remote-ssh\\vscode-ssh-host-remote-workspace-2703-44203-78a4c91400152c0f27ba4d363eb56d2835f9903a\\data.json"}
[02:47:01.352] Local server env: {"DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"c:\\Users\\vilicvane\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\local-server\\askpass.bat","VSCODE_SSH_ASKPASS_NODE":"C:\\Users\\vilicvane\\AppData\\Local\\Programs\\Microsoft VS Code\\Code.exe","VSCODE_SSH_ASKPASS_MAIN":"c:\\Users\\vilicvane\\.vscode\\extensions\\ms-vscode-remote.remote-ssh-0.50.0\\out\\askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"\\\\.\\pipe\\vscode-ssh-askpass-cf756a078da983c2815482214cc6885085d3daf3-sock"}
[02:47:01.364] Spawned 6804
[02:47:01.471] > local-server> Spawned ssh: 15340
[02:47:01.515] stderr> OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
[02:47:02.006] stderr> debug1: Server host key: ecdsa-sha2-nistp256 SHA256:[sanitized]
[02:47:02.485] Got askpass request: {"request":"Enter passphrase for key '/c/Users/vilicvane/.ssh/id_rsa': "}
[02:47:02.486] Detected passphrase message
[02:47:02.487] Listening for interwindow password on \\.\pipe\vscode-ssh-askpass-0d4605af68a4b6e24d4259d2d257f3f0ba2749a3-sock
[02:47:02.487] Writing password prompt to globalState
[02:47:08.588] Passphrase dialog canceled
[02:47:08.589] Interactor signaled cancel
[02:47:08.590] Cleaning up other-window auth server
[02:47:08.805] Got askpass request: {"request":"[email protected]'s password: "}
[02:47:08.868] stderr> Permission denied, please try again.
[02:47:09.033] Got askpass request: {"request":"[email protected]'s password: "}
[02:47:09.100] stderr> Permission denied, please try again.
[02:47:09.269] Got askpass request: {"request":"[email protected]'s password: "}
[02:47:09.336] stderr> [email protected]: Permission denied (publickey,password).
[02:47:09.339] > local-server> ssh child died, shutting down
[02:47:09.353] Local server exit: 0
[02:47:09.353] Received install output: OpenSSH_8.2p1, OpenSSL 1.1.1d 10 Sep 2019
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:[sanitized]
Permission denied, please try again.
Permission denied, please try again.
[email protected]: Permission denied (publickey,password).
[02:47:09.356] Resolver error: Permission denied (publickey,password).
[02:47:09.372] ------
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 There seems to be multiple bugs for this "local server". I guess the one you mentioned is just one of them. The issue we are experiencing might be something related to ssh config parsing or ssh agent.
I originally configured Remote - SSH to use Windows' SSH client, but from what I can see in version 0.50.0 the local server chose the SSH client bundled with Git and totally missed the config file.
For me the following fixed it:
Before setting up the above the extension seemed to use an ssh client that ignored my KeeAgent and ssh config and so failed to authenticate. Downgrading to 0.49 without doing any of the above also worked.
I needed to downgrade plugin to 0.49 and switched to bash as a default shell. It works now but, i hope that it will be fixed
So there are a few known issues, and I will close this unless the OP responds. For anyone else having issues, please check other open issues or file your own.
General workaround:
"remote.SSH.useLocalServer": false,
"remote.SSH.windowsRemotes": ["<your remote hostname>"] // Only if the remote is Windows
A co-worker of mine bumped into this issue. The setup was using a jumphost to connect from a windows machine to a linux server but using a linux jumphost might not be the reason. What the log showed was that vscode was trying to established an ssh session on the _remote side_ (the linux server) using the _Windows_ full path of the ssh.exe in the form "C:WindowsSystem32OpenSSHssh.exe" (backslashes don't appear in the output window). I don't have the output now but as far as I remember the remote error was raise by /bin/sh so the extension was certainly tried to execute ssh with the windows path. As far as we could tell the only place in the local config files the path appeared was the proxy command in .ssh/config that needed to use the jumphost. Completely removing the server from the linux machine, reinstalling vscode on the windows client and then downgrading ssh extensions from 0.50.1 to 0.49.0 helped.
Same for me, last version working is 0.49.0. All versions after that failing to connect. Using Linux version here.
I have experienced this as well with the fish shell. All I had to do to resolve it was disable Use Local Server
same issue, nuked ~/.vscode-server works for me, no settings changed
I had the same issue. Deleting the ~/.vscode-server and ~/.vscode-remote and reconnecting worked for me as @owlwalks mentioned.
Most helpful comment
If I read the release notes right on 1.4.3, Remote SSH has changed the default of option
remote.SSH.useLocalServertotrue. 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.useLocalServertofalseOR 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).