Closed nikolaqm closed 2 years ago
Are you running a sshd
server in WSL / WSL 2 or did you add the OpenSSH feature of which the server is running?
Thank you for response! Connection is from Linux to Windows, specifically:
I am running SSH FS extension in containerized code-server that is on based on Ubuntu. That container is running on WSL2 on Windows 10 Pro.
Windows 10 Pro has OpenSSH server (and client) enabled.
I am connecting with SSH FS to the Windows Docker hosting OS ("host":"host.docker.internal"
) using key authentication.
This got fixed in 9410ac2 which'll be in the next version (i.e. v1.24.2 or, most likely, v1.25.0) of the extension. I've tested it both with and without having set Terminal command
to powershell
. It should now also auto-detect whether to use the WINDOWS_COMMAND_SEPARATOR
flag, although specifying it (which would "override" it to true) wouldn't matter for Windows systems where the extension auto-detects it.
Many thanks for rapid response @SchoofsKelvin ! And thank you for this very useful extension!
Summary
Extra
/
incd <root_path>
in "Open remote SSH terminal" prevents terminal to open absolute path in Windows.Steps to reproduce
I am connecting to OpenSSH server running on Windows. My workspace folder is connected well using the following URI in
.code-workspace
configurationHowever if I click on "Open remote SSH terminal" connection to terminal fails because extensions tries to
cd
into/C:\Users\user...
(note the leading/
). Here is output of log:Confirmation of bug origin
To confirm this leading
/
is the problem I did the following: I specify asroot
folder insettings.json
path manually without leading/
like this:I can open remote SSH terminal directly clicking from SSH FS extension list of hosts.
However, again, if one mounts this as a folder, and then tries right-click on folder "Open remote SSH terminal" path will again have leading
/
inherited from URI.Question
Can we resolve this bug somehow or find a workaround?
Can we maybe add extra flag that would be removing leading
/
from URI, or make existing flagWINDOWS_COMMAND_SEPARATOR
also activate removal of leading/
fromroot
path used forcd
when opening a new terminal?Many thanks for your help!