Can't SSH into WSL

When I try to SSH into my QSL install from Cursor, I get an error:

[2024-09-24 15:05:04.067] Extension version: 0.81.8
[2024-09-24 15:05:04.068] L10N bundle: undefined
[2024-09-24 15:05:04.084] authorityHierarchy: wsl+ubuntu20
[2024-09-24 15:05:04.084] WSL extension activating for a local WSL instance
[2024-09-24 15:05:04.129] Resolving wsl+ubuntu20, resolveAttempt: 1
[2024-09-24 15:05:04.130] WSL feature installed: true (dll path)
[2024-09-24 15:05:04.130] NodeExecServer run: C:\Windows\System32\wsl.exe --list --verbose
[2024-09-24 15:05:04.221] 2 distros found
[2024-09-24 15:05:04.221] Starting VS Code Server inside WSL (wsl2)
[2024-09-24 15:05:04.222] Windows build: 19045. Multi distro support: available. WSL path support: enabled
[2024-09-24 15:05:04.222] Scriptless setup: false
[2024-09-24 15:05:04.222] No shell environment set or found for current distro.
[2024-09-24 15:05:04.375] WSL daemon log file: 
[2024-09-24 15:05:04.378] Probing if server is already installed: if [ -d ~/.cursor-server/bin/297991d169fa3a11975c5aa95adc69be73250c70 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf alpine-; fi; uname -m
[2024-09-24 15:05:04.378] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu20 -e sh -c if [ -d ~/.cursor-server/bin/297991d169fa3a11975c5aa95adc69be73250c70 ]; then printf 'install-found '; fi; if [ -f /etc/alpine-release ]; then printf alpine-; fi; uname -m
[2024-09-24 15:05:06.728] Probing result: x86_64
[2024-09-24 15:05:06.728] No server install found in WSL, needs linux-x64
[2024-09-24 15:05:06.728] Getting server from client side
[2024-09-24 15:05:06.729] Found C:\Users\mike\AppData\Local\Temp\vscode-remote-wsl\297991d169fa3a11975c5aa95adc69be73250c70\vscode-server-stable-linux-x64.tar.gz. Skipping download.
[2024-09-24 15:05:06.732] Server available at C:\Users\mike\AppData\Local\Temp\vscode-remote-wsl\297991d169fa3a11975c5aa95adc69be73250c70\vscode-server-stable-linux-x64.tar.gz
[2024-09-24 15:05:06.733] NodeExecServer run: C:\Windows\System32\wsl.exe -d Ubuntu20 sh -c '"$VSCODE_WSL_EXT_LOCATION/scripts/wslServer.sh" 297991d169fa3a11975c5aa95adc69be73250c70 stable cursor-server .cursor-server --host=127.0.0.1 --port=0 --connection-token=211551641-506148364-3305741095-3780230287 --use-host-proxy --without-browser-env-var --disable-websocket-compression --accept-server-license-terms --telemetry-level=all'
[2024-09-24 15:05:07.051] Setting up server environment: Looking for /home/mike/.cursor-server/server-env-setup. Not found.
[2024-09-24 15:05:07.051] WSL version: 5.15.153.1-microsoft-standard-WSL2 Ubuntu20
[2024-09-24 15:05:07.051] Updating VS Code Server to version 297991d169fa3a11975c5aa95adc69be73250c70
[2024-09-24 15:05:07.051] Removing previous installation...
[2024-09-24 15:05:07.051] Installing VS Code Server from tar available at /mnt/c/Users/mike/AppData/Local/Temp/vscode-remote-wsl/297991d169fa3a11975c5aa95adc69be73250c70/vscode-server-stable-linux-x64.tar.gz
[2024-09-24 15:05:08.292] Unpacking:   0%
[2024-09-24 15:05:08.293] mkdir: cannot create directory ‘/home/mike/.cursor-server/bin/297991d169fa3a11975c5aa95adc69be73250c70-1727190308’: Permission denied
[2024-09-24 15:05:08.293] For help with startup problems, go to https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
[2024-09-24 15:05:14.906] Download in background is enabled

I’ve trieed Fix WSL command, but nothing I do can get Cursor to work with WSL

Hi @mikehale

Try this:

I’m already using WSL, the issue is I can’t connect to it from Cursor

Tried a fresh install, when Cursor runs I see a notification in the lower left corner “Starting VS Code in WSL: Unpacking 0%”

Then I get an error that “VS Code server for WSL closed unexpectedly”

The logs show this:

[2024-10-01 14:53:56.534] Removing previous installation…
[2024-10-01 14:53:56.534] Installing VS Code Server from tar available at /mnt/c/Users/mike/AppData/Local/Temp/vscode-remote-wsl/51c8aff7cb5a89f4a0e462fbacab938bdbfaf140/vscode-server-stable-linux-x64.tar.gz
[2024-10-01 14:53:57.739] Unpacking: 0%
[2024-10-01 14:53:57.739] mkdir: cannot create directory ‘/home/mike/.cursor-server/bin/51c8aff7cb5a89f4a0e462fbacab938bdbfaf140-1727794437’: Permission denied
[2024-10-01 14:53:57.739] For help with startup problems, go to Visual Studio Code Remote Development Troubleshooting Tips and Tricks
[2024-10-01 14:57:05.941] Download in background is enabled