I have ssh access to almost a dozen machines, and tend to work from multiple devices myself (one main laptop, one home laptop, a smartphone via termux, a tablet via termux, one backup macbook, a cygwin install in the office). Additionally, some of those machines need access to each other (e.g. rsync over ssh for remote backup).
When I had fewer devices I was quite strict on unique key for each pair of connections, but that became way too cumbersome, so what I currently do is maintain two keys (called 'personal' and 'work') for each device, and have two different 'authorized_keys' files which list the public key for all my devices' keys. I have a simple bash script which pushes these authorised_keys files to the right machines.
This is also breaking down in terms of complexity because, for example, there are some devices which should have additional inter-device keys which I don't want to grant access to all my machines (e.g. a key just for backup shouldn't be allowed to access my home laptop).
What's a convenient way to manage the keys (and particularly authorized_keys) on each of those machines? I'm aware of ansible and puppet, and have taken a look at both, but they seem pretty overcomplicated for what I'm trying to do.
I suppose the ideal situation for me would be to have some type of matrix mapping between keys and machines, which would then generate the right authorized_keys file for all machines and push it, but openssh doesn't seem to have such a tool.