What, if any, are the downsides to this?
Is it just as OP states in article, where you have to interact with the authentication process to provide a key (assuming no key is associated to host as you explain)?
Is it just as OP states in article, where you have to interact with the authentication process to provide a key (assuming no key is associated to host as you explain)?
If you only SSH into servers you trust (a sensible practice) then the benefit is marginal.
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*Host foo foo.example.com some.other.alias
This kind of stuff is also useful, for example, for AWS machines:
Host ec2-*.compute-1.amazonaws.com
# KeepAlive of 50 seconds, because AWS times out after 60:
# https://aws.amazon.com/blogs/aws/elb-idle-timeout-control/
ServerAliveInterval 50That you trying to SSH into some random server doesn't know that you also use github?