Multiple ssh keys for same domain?




For our deployment setup, we have different roles for different branches/environments, but on the same domain. For example the staging branch might deploy with and production with When I add ssh keys to the UI in CircleCI, adding a second key for seems to overwite the first one. Is there any way to have both live in harmony?



I believe that if you leave out the domain portion it will have both keys available during the build and use the one that works.


Thanks, that makes sense. I’ve tried adding the private key from ~/.ssh/id_rsa on my server to the project’s SSH Permissions->SSH Keys, but during the deployment step, it’s asking for the server password, so it must not be working. Is there anything else I need to do to enable it?

Edit: Nevermind, it worked!