Skip to content

Instantly share code, notes, and snippets.

@ciis0
Last active January 17, 2023 16:59
Show Gist options
  • Save ciis0/80d87ca311f9d6024f49ab912e534cf5 to your computer and use it in GitHub Desktop.
Save ciis0/80d87ca311f9d6024f49ab912e534cf5 to your computer and use it in GitHub Desktop.
start wsl ssh and connect using Windows OpenSSH running in pterm
wsl sudo service ssh start
reg add HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\Sessions\wsl /v HostName /t REG_SZ /d $(wsl hostname -I) /f
start pterm "-e", ssh, "-A", "-p", 2222, "-l", "cschulz", "-R", ":9000:127.0.0.1:9000", $(wsl hostname -I).trim()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment