In order to enable ssh on your WSL 2 system (using distro Ubuntu 18.04 ) you need to following configurations:
Open the WSL2, and edit folowing file "/etc/ssh/sshd_config"
and set following:
"Port" 2222
"ListenAddress" 0.0.0.0
"PasswordAuthentication" "yes"
Save the changes. And then run below command to generate your ssh keys.
sudo ssh-keygen -A
finally restart sshd service using following command,
"sudo service ssh --full-restart"
After that you are all set to go :)
No comments:
Post a Comment