Skip to content

Instantly share code, notes, and snippets.

View mt's full-sized avatar

Mathew Thomas mt

  • https://n3xt.io/
  • NYC
  • 18:33 (UTC -04:00)
View GitHub Profile
@mt
mt / Setup-WSL2SSH.ps1
Created June 7, 2025 18:42 — forked from da-moon/Setup-WSL2SSH.ps1
Powershell script to setup SSH server in WSL so that Windows users can SSH into WSL. It can be useful for "remote" development with Editors such as Lapce or Zed
# Flexible WSL2 SSH Setup Script with Distribution Detection
# Ensure running as Administrator
if (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
Write-Warning "Please run this script as Administrator!"
Exit
}
# Function to get the default WSL distribution
function Get-DefaultWSLDistribution {
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
</body>
</html>

Keybase proof

I hereby claim:

  • I am mt on github.
  • I am mthomas (https://keybase.io/mthomas) on keybase.
  • I have a public key whose fingerprint is 45C2 BB5E C893 90F2 8F51 857F 91AD 343A 9D2F 6FC2

To claim this, I am signing this object: