Skip to content

cheng-chi/wsl_ssh_startup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Launch WSL2 at startup and setup SSH port forwarding

Setup

  1. In run_wsl2-at_startup.ps1, replace Ubuntu-20.04 with your distribution name.
  2. In run_wsl2-at_startup.ps1, replace $windows_port = 6022 with your desired port for exposing ssh server from wsl2
  3. In runner.vbs, replace C:\Users\cchi\dev\wsl_network\PsExec.exe and C:\Users\cchi\dev\wsl_network\run_wsl2_at_startup.ps1 with the actualy path to your copy of this repo.
  4. In task scheduler, setup a task following this tutorial, but action to execute their run_wsl2_at_startup.vbs with the path to runner.vbs in this repo.
  5. Run the task manually in task scheduler and check the content of stderr.txt and stdout.txt (created by the run_wsl2_at_startup.ps1) for error. Ideally, both of these files should be empty.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published