I noticed that the Github instructions for adding an ssh key to your account say that you need to add the key to both your
~/.ssh/config file AND to the
ssh agent with
But, I just noticed however that if I clear the keys from the ssh agent with
ssh-add -D, then I'm still able to push and pull from my github repos just fine.
I think this makes sense because in my
~/.ssh/config file, I specify that for
Host * (all hosts), the exact IdentityFile to use, so it will use that one automatically.
So, my question is - why even add the key to the ssh-agent directly at all? Is there a case in which my way of only added to the ~/.ssh/config file won't work?