# Using the SSH agent in WSL2 The `keychain` utility makes using [[Secure Shell]] with passphrase authentication much easier. It detects if an SSH agent process is already running; if not, it'll start one. Via `ssh-askpass`, it'll also make sure the agent knows your passphrase. [Source](https://esc.sh/blog/ssh-agent-windows10-wsl2/) ## Setup Install packages: ``` apt install keychain ssh-askpass ``` Add this to your shell startup script(s): ``` /usr/bin/keychain -q --nogui ~/.ssh/id_rsa source ~/.keychain/$(hostname)-sh ```