Reverse SSH shell to WSL2 WLS2 is configured by default in a NAT network.That means we can't generally reach it from the outside. To connect to it externally, let us configure WSL 2 for reverse shell Prerequisite Another SSH server that acts as gateway. This server should be accessible from the outside. For this exercise we will be using 192.168.2.30 as the gateway IP. Step 1: Enable SSH on WSL2 $: sudo ssh-keygen -A Then start SSH: $: sudo service ssh start Step 2: Verify connection from WSL2 to the gateway SSH server $: ssh -R 2222:localhost:22 u1@192.168.2.30 Below is an example connection to Kali SSH server From Kali gateway server, verify that we can connect to port 2222, like: $: ssh u2@localhost -p 2222 By default WSL2 does not allow SSH connection using password, you will get an error like below. u2@localhost: Permission denied (publickey). To fix this, change /etc/ssh/sshd_config on WSL2, ensure that: PasswordAuthentication is set to yes ChallengeRespo