VSCode use WSL ssh config and identity?

Viewed 238

I'm using WSL2 on Windows 10 and 11 to do all of my ssh stuff but I'd like to be able to use the wsl2 ssh config + identity + agent from wsl within my VSCode.

Saw some approaches with a seperate ssh.bat with one of the following contents

C:\Windows\system32\wsl.exe bash --login -c ssh %* C:\Windows\system32\wsl.exe bash -ic 'ssh %' C:\Windows\system32\wsl.exe ssh %

With the ssh.bat beeing in the remote.SSH.Path.

The only error i could find was this but im pretty sure it worked like this before:

[14:18:34.726] Got error from ssh: spawn "C:\Users<USER>\Documents\ssh.bat" ENOENT [14:18:34.727] The specified path "C:\Users<USER>\Documents\ssh.bat" is not a valid SSH binary

Nothing seemed to work. For some reason it does not use the wsl ssh. Any Ideas?

0 Answers
Related