I use WSL with Ubuntu on my laptop to develop on Linux while I'm away from my desktop (with native Linux, where I don't experience any problems like this). I have private git repo setup, and I use ssh to connect to it. I have ssh configured (in
.ssh/config), and I have multiple keys for my VPS, GitHub, other VPS user account etc. so I use
ssh-add on my desktop to manage them. But on my laptop, in WSL, when I try to connect to my VPS, ssh asks for the passphrase to the key. When I try to do
ssh-add .ssh/mykey I get an error:
$ ssh-add .ssh/mykey Could not open a connection to your authentication agent.
ssh-agent is running:
$ ps -e | grep ssh 4455 ? 00:00:00 ssh-agent 5517 ? 00:00:00 sshd 6164 pts/0 00:00:00 ssh
I don't see why is there a problem. If I kill currently running
ssh-agent and launch it again (using
eval $(ssh-agent -s)) it works fine.