Showing posts from March, 2022

How to get the SSH agent running when WSL starts

To get the agent running when WSL starts, first install keychain. sudo apt install keychain Then add the following line to your ~/.bashrc file… eval ``keychain --eval --agents ssh id_rsa

Adding your SSH key to the ssh-agent

# start the ssh-agent in the background $ eval "$(ssh-agent -s)" Agent pid 2255 $ ssh-add Enter passphrase for /home/sqley/.ssh/id_rsa: Identity added: /home/sqley/.ssh/id_rsa (sqley@DESKTOP-8NPR888)

If you want ssh-agent to forget your key after some time, you can configure it to do so by running ssh-add -t .