-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect to WSL via SSH on macOS #7312
Comments
@vilicvane Are you able to connect to your Windows machine over SSH? |
Yes. |
When you then open the terminal, does it not show a WSL session? |
@ntrogh It shows PowerShell. Should I do something to enter WSL? |
In the terminal panel, can you use the dropdown to select WSL? |
@ntrogh I’ll check the dropdown later. And yes, currently I am using SSH server running on WSL. |
Something similar happens to me:
|
@connor4312, are there specific setup instructions for this to work on macOS? |
@juaoose Added an issue to update the docs |
Yes, this is supported. You need the WSL extension installed, and then WSL in the Remote Explorer will be populated and you can use the usual "reopen in WSL" commands. |
Interesting, after connecting via SSH (in VSCode), the WSL Targets doesn't show anything. Is there any extra setup required? |
What version of WSL do you have installed on the Windows machine? |
|
Can you run the |
|
You should be able to resolve this by installing the latest version of WSL from their msi installer available at https://github.com/microsoft/WSL/releases/tag/2.1.5 |
Hmmm I'm not sure I can risk that installation atm. On a note: I verified those paths mentioned in the logs... it looks like my WSL is in "C:/Program Files/WSL/wsl.exe" and not in system32? Is there no way to make the extension use that? |
@connor4312 My log shows similar, and I tried to execute wsl command in the PowerShell (remotely connected via VSCode):
Directly run this command in Windows PowerShell:
I have also tried the msi installer, although my WSL was already the latest version. After running the msi installer, it prompted for Administrator privilege and then did nothing. |
@connor4312 I think it might relate to this microsoft/WSL#8072 and this comment may be a workaround. |
In the 1.89 release note, it states that it's now possible to connect to WSL via SSH. But I cannot get it work on macOS.
Is it supported anyway?
The text was updated successfully, but these errors were encountered: