Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
wsl2 ssh setup
#windows10 admin powershell
netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=22 connectaddress=YOUR_WSL2IP connectport=22
netsh advfirewall firewall add rule name="Open Port 22 for WSL2" dir=in action=allow protocol=TCP localport=22
netsh interface portproxy show v4tov4
#wsl2
#first time
sudo apt-get install -y openssh-server
sudo ssh-keygen -A
sudo service ssh start
#add ssh key to wsl2 user or change sshd auth method allowed (key is better)
sudo vi /etc/ssh/sshd_config
PasswordAuthentication no
to
PasswordAuthentication yes
#vc add
sudo apt-get install -y ninja-build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment