Deployment key is great feature (of Github, Bitbucket...) in which we provide 'read' and only 'read' privileges for the server.
I make use of deployment keys in my daily working. And today I find myself the need of config SSH so that the server use separated SSH key for associated servers. For example
* ~/.ssh/bitbucket for Bitbucket projects
* ~/.ssh/bitbucket for Github projects
In case we have more than 1 SSH key and we need to setup separated SSH key for each server, we make use of SSH_config
(~/.ssh/config OR /etc/ssh/ssh_config)
Host bitbucket.org User git IdentityFile ~/.ssh/bitbucket Host github.com User git IdentityFile ~/.ssh/git
And in case we need to go further with SSH config, read more at SSH_config. For example we could find ourselves in need of change SSH port to any number other than default 22.