For awhile now, each time I got a new Windows laptop I would dig up strasis gist on how to set up agent forwarding for SSH in WSL2 -- but recently I tried to point someone else at it and they were very confused by it, so this is my attempt at simpler instructions.
Either copy and paste the contents of the Install.ps1 into PowerShell on Windows, or download the zip of this, extract both script files, and run the install.ps1 from PowerShell (on Windows)
wsl-ssh-agent
Thank you! This worked perfectly!
I did have to follow these instructions as well: https://superuser.com/questions/1726204/get-agent-identities-ssh-agent-bind-hostkey-communication-with-agent-failed
I was able to use
ssh-add -lin wsl after running the script, but trying to ssh gavecommunication with agent failed. Following that SO and restarting seems to have fix it. I've done this one two different computers now, both working.