Multiple SSH private keys for the same host

I would do it like this:

Host project_1
    HostName github.com
    IdentityFile /etc/ssh/my_project_1_github_deploy_key

Host project_2
    HostName github.com
    IdentityFile /etc/ssh/my_project_2_github_deploy_key

and then use project_1 or project_2 as the host to access the repository.


You can provide multiple identity files that SSH will attempt in sequence until one works or they all fail.

Host github.com
    IdentityFile /etc/ssh/my_project_1_github_deploy_key
    IdentityFile /etc/ssh/my_project_2_github_deploy_key
    StrictHostKeyChecking no