When there are multiple public and private key pairs locally, add these private keys to the private key table used for verification through ssh-add. In this way, when we connect to the server through the SSH client (Git's SSH protocol), the private keys in the local private key table will be checked one by one.
I referred to this tutorial before, please check if it is the answer you want.
《git configure multiple SSH-Key》
When there are multiple public and private key pairs locally, add these private keys to the private key table used for verification through
ssh-add
.In this way, when we connect to the server through the SSH client (Git's SSH protocol), the private keys in the local private key table will be checked one by one.