Question
How to force usage of a specific key for SSH ?
To force usage of a specific key, put in your ~/.ssh/config file :
Host [HOST_NAME]
Hostname [HOST_NAME]
User [USER_NAME]
Port [PORT]
IdentityFile ~/.ssh/[your_private_key]
Example for gitlab:Host gitlab.company.com
Hostname gitlab.company.com
User git
Port 10022
IdentityFile ~/.ssh/[your_private_key]
Add new comment