![]() ![]() See this Github comment and thread and my summary of your general options for port forwarding here. If, on the other hand, you need real SSH access to the WSL instance, then the "usual answer" is fairly complicated still. ![]() That just connects to the Windows host, allocates a pseudo-terminal with -t, and runs the wsl command using that pseudo-terminal. Access your WSL instance remotely using ssh -t wsl.Install OpenSSH server in Windows ( instructions).If you just need terminal access to WSL from a remote machine, then here's a far easier solution: WSL does provide automatic localhost forwarding, though, so you can ssh in from Windows on the same machine, or from another WSL instance on the same machine. WSL2 also runs in a VM with a virtual network interface that is NAT'd, so you won't be able to ssh into the WSL instance from any other machine on the network without additional effort. So using sudo service ssh start (or restart, or status, or stop, etc.) is what you'll use.īut that's just the beginning of it. The WSL version of Ubuntu still provides the old init.d style scripts for most services. As others have mentioned, since WSL does not yet support the systemd init system and infrastructure, you'll need to rely on other methods.A few things to note when trying to use SSH on WSL2: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |