Integrate WSL2 ssh_config with Windows PowerShell
Use the Include directive on Windows (Recommended)
The OpenSSH client built into Windows supports the Include directive, including with network paths (UNC). This avoids permission issues on Windows.
- Open PowerShell or Notepad on Windows.
- Edit the Windows SSH configuration file:
# Open Windows SSH config in notepad notepad $env:USERPROFILE\.ssh\config - Add the following line at the top of the file (adjusting for your actual path):
# Include WSL2 SSH config as primary Include \\wsl.localhost\Ubuntu\home\<YourLinuxUser>\.ssh\config - Save and close the file.