Remember ssh key in WSL

For development purposes we currently still need ssh authentication for git. Most of the solutions require to enter the passphrase multiple times. But now there is a better solution, which requires it just when the wsl is starting.

First install the keychain to hold the secret

sudo apt install keychain

Then add the following line to your shell’s configuration file (likely ~/.bashrc):

eval keychain --quiet --eval --agents ssh id_rsa