vscode: SSH remote not working in 1.43
- VSCode Version: 1.43
- OS Version: Windows 10 1903
Steps to Reproduce:
- Update from VSCode 1.42.1 to 1.43
- 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
toC:\Windows\System32\OpenSSH\ssh.exe
If nothing works for you, try other workarounds in this ticket or the other ticket
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 28
- Comments: 25 (4 by maintainers)
@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.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.
EDIT: I created an issue in the remote extensions repo too: https://github.com/microsoft/vscode-remote-release/issues/2513
@roblourens FYI You mentioned you planning to change the default for useLocalServer on Windows, but note that I had to set
remote.SSH.useLocalServer
tofalse
on my VS Code running on Fedora 31 as well to work around the problem.If I read the release notes right on 1.4.3, Remote SSH has changed the default of option
remote.SSH.useLocalServer
totrue
. 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
tofalse
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).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
?I got the following in the output panel when trying to connect from Mac to Linux with version 0.50.0 of
Remote - SSH
: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.