Can you and is it advisable to use the same ssh ke

2019-05-28 17:48发布

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条回答
Bombasti
2楼-- · 2019-05-28 18:04

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.

查看更多
登录 后发表回答