ssh-agent ๐Ÿ‘ฎ

ssh-add -l    # to list the agent's keys, 
ssh-add -D   # to clean out all keys.

SO

How to Setup Multiple Ssh Keys for Multiple Github/Bitbucket accounts.

~/.ssh/config can contains rules to use different keys depending on the host contacted.

Host github.com
  HostName github.com
  IdentityFile ~/.ssh/id_rsa_github

Host gitlab.com
  HostName gitlab.com
  IdentityFile ~/.ssh/id_rsa_gitlab

Troubleshooting ๐Ÿ› ๏ธ

Check SSH agent settings

  • Linux Mint (Ubuntu-derived) does not use systemd ssh-agent
    • It uses GNOME Keyring as SSH agent.
    • systemctl โ€“user status ssh-agent is irrelevant.
Written on August 19, 2018, Last update on December 20, 2025
ssh