Skip to content

Instantly share code, notes, and snippets.

View silentTeamMapReduce's full-sized avatar
🔥

Nikita silentTeamMapReduce

🔥
View GitHub Profile
@adamelliotfields
adamelliotfields / windows-ssh-no-password-with-keys-wsl2.md
Last active May 3, 2024 02:33
Windows SSH Server with Password-less Key Authentication and Default WSL2 Shell

Windows SSH Server with Password-less Key Authentication and Default WSL2 Shell

Disclaimer: I am not a Windows Admin and I'm not even that good with PowerShell.

I wanted to be able to SSH into my Windows laptop directly into Linux. I also wanted to disable password authentication and only allow public key (RSA in my case) authentication.

Scott Hanselman wrote a blog post on how to make your default WSL2 distro your default shell for SSH. Windows OS Hub published an article on using public key