I run Windows 10 with WSL. I have the desired behaviour on one computer, but cannot replicate elsewhere. Here\'s what I\'m after:
I tried both methods in previous answers (as well as others found elsewhere) on WSL 2 and they either did not work or had caveats I couldn't live with. This is what worked for me.
Install keychain:
sudo apt install keychain
Then add the following line to your shell's configuration file (likely ~/.bashrc or ~/.zshrc):
eval `keychain --quiet --eval --agents ssh id_rsa`
Now you will only have to enter your password when booting WSL!
Thank you Birk Holland for this article.