Switchable SSH Profiles for Github In your rc file: alias gitp="git config --global core.sshCommand \"ssh -F ~/.ssh/config-personal\" && \ git config --global user.email [email protected] && \ git config --global user.name \"My Name\" && \ git config --global commit.gpgsign true && \ git config --global user.signingkey XXXXXXXXXXXXXXXX && \ echo \"Switched git to personal profile\"" alias gitw="git config --global core.sshCommand \"ssh -F ~/.ssh/config-work\" && \ git config --global user.email [email protected] && \ git config --global user.name \"My Name\" && \ git config --global commit.gpgsign true && \ git config --global user.signingkey XXXXXXXXXXXXXXXX && \ echo \"Switched git to work profile\"" Example config files: ~/.ssh/config-personal Host * IgnoreUnknown UseKeychain UseKeychain yes AddKeysToAgent yes IdentityFile ~/.ssh/id_ed25519-personal IdentitiesOnly yes ~/.ssh/config-work Host * IgnoreUnknown UseKeychain UseKeychain yes AddKeysToAgent yes IdentityFile ~/.ssh/id_ed25519-penji IdentitiesOnly yes