|
|
|
|
|
by Macha
1265 days ago
|
|
Note that it does accept wildcards so you can do rules for *.mycompany.com You can also use placeholders for keys, so for example I have a ssh config like: Host *.mycompany.com
# Employer specific yubikey stuff
Host *.mydomain.com
IdentityFile ~/.ssh/keys/id_primary
Host *
IdentitiesOnly yes
IdentityFile ~/.ssh/keys/%r@%h # uses ~/.ssh/keys/git@github.com for github for example
I originally started doing this because I would have so many keys that servers would reject me for too many authentication attempts, but it also helps make it easy to use distinct keys for distinct purposes and avoiding fingerprinting like this* |
|
This kind of stuff is also useful, for example, for AWS machines: