问题
Can you use the same ssh key for different version control hosting services?
And if you can, what are the pros and cons?
Scenario: I have ssh keys that I am using on my computer, can I and should I use the same ssh keys with gitlab/gitbucket on the same computer?
回答1:
No, it is not advisable: a private key should remain used for only one service, that way you can revoke/change it just for that service.
What you can do is set up a ~/.ssh/config file in which you can associate the right private key with the right host, as explained here.
来源:https://stackoverflow.com/questions/56285972/can-you-and-is-it-advisable-to-use-the-same-ssh-key-for-github-and-gitlab-gitbuc