vscode-remote-release
vscode-remote-release copied to clipboard
Remote SSH extension on Windows requires Windows-like paths in `~/.ssh/config`, whereas CLI `ssh` does not
- VSCode Version: 1.68.1
- Local OS Version: Windows 10
- Remote OS Version: Ubuntu
- Remote Extension/Connection Type: SSH
- Logs: N/A
Steps to Reproduce:
- Use a
~/.ssh/config
file with a line of the formIdentityFile /c/.../.ssh/xyz_rsa
- A Windows
ssh
CLI client (shipped with Windows 10 I believe, or preconfigured by IT dept) successfully finds the identity file using the unix-like path. - The VSCode "Connect to Host" command (which finds and uses the same
~/.ssh/config
file by default) does not successfully find the rsa identity file. - Change the
~/.ssh/config
file to use a Windows-like path:IdentityFile C:\\...\.ssh\xyz_rsa
and both thessh
CLI client and VSCode's "Connect to Host" command succeed.
I would not necessarily call this a bug - I think the ssh
CLI supporting both path formats is a "nice-to-have", but this extension, which by default consumes existing config files, kind of implicitly claims to support them with parity.
Shouldn't be hard to update to support this. Thank you!
Thanks for creating this bug! I'll look at this in the upcoming iteration
Looking at this issue again I don't think this is something that the Remote SSH should fix because it actually uses OpenSSH on your machine to do the connection. If OpenSSH for Windows expects Windows-like paths then I think we should expect the same.
@tanhakabir thank you for this response. Two thoughts:
- My Windows path uses a
ssh
executable that can make use of Unix-like paths (when using the default command prompt even). Maybe then the issue is just that VSCode is using a differentssh
executable from the default one on the Windows path (apparently "OpenSSH on your machine") - I don't know why that would be. - I started using "Remote: WSL" for pretty much everything, and I do not have this issue. Kudos to whoever maintains that project, it is 99% of why I use VS Code.
Oh OpenSSH is the default SSH client for Windows. I'm not sure if you use something else but essentially we call upon OpenSSH to do the connection via ssh your_remote
in Powershell