Skip to content

Instantly share code, notes, and snippets.

@flying-sausages
Created December 17, 2020 20:35
Show Gist options
  • Save flying-sausages/ae9fb1475c4d05692506cdaf884acab7 to your computer and use it in GitHub Desktop.
Save flying-sausages/ae9fb1475c4d05692506cdaf884acab7 to your computer and use it in GitHub Desktop.

SSHing into fucking WSL2

So this is stupidly absurd to achieve right. Here are the steps I go through to get a key-based auth into the default WSL2 shell.

Add your keys

https://www.concurrency.com/blog/may-2019/key-based-authentication-for-openssh-on-windows

Change the ports and disable password auth

https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration

Change default Windows' OpenSSH shell to bash.exe

https://www.hanselman.com/blog/the-easy-way-how-to-ssh-into-bash-and-wsl2-on-windows-10-from-an-external-machine

Open the fucking ports

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment