Created
September 6, 2021 05:38
-
-
Save liongkj/f873e3f1a3d49dea92684fd680b9ec4f to your computer and use it in GitHub Desktop.
route_ssh_to_wsl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| wsl.exe sudo /etc/init.d/ssh start | |
| $wsl_ip = (wsl hostname -I).trim() | |
| Write-Host "WSL Machine IP: ""$wsl_ip""" | |
| netsh interface portproxy add v4tov4 listenport=65320 connectport=65320 connectaddress=$wsl_ip listenaddress=0.0.0.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment