If I have multiple ~/.ssh key pairs for connecting to Github ([email protected]:hivelogic2018/nuxt-vuetify-simple.git), Gitlab and I just generated new pair for Forgejo. How does eval $(ssh-agent -s) and ssh-add ~/.ssh/id_forgejo_rsa do? How to keep them together in sync for different git servers? with ssh-add ? without having to keep switching among ssh-agent(s) ?
eval $(ssh-agent -s) and ssh-add ~/.ssh/id_forgejo_rsa are the two key commands for managing SSH authentication with an SSH agent.
ssh-agent is a program that runs in the background and holds your private SSH keys in memory. This is a secure way to manage your keys, especially those with passphrases, since it prevents you from having to enter the passphrase every time you connect to a server. When you run eval $(ssh-agent -s), you're starting this program and setting environment variables (SSH_AUTH_SOCK and SSH_AGENT_PID) in your current shell session so that other SSH programs know where to find the running agent.
ssh-add is the comm