Really like the approach here. In the past, I've typically managed my SSH keys by naming them as id_ like so, then tinkering with the ssh_config to make use of them. Never thought of using the token approach, though, definitely makes things simpler to work with.
The config file already does this, this is just a shortcut with %h and the file system structure. You literally start an entry with "Host " follwed by "User" and "IdentifyFile". There's even a bash autocomplete rule for it so you can tab through your servers "ssh ". It won't send all the keys to the server if you organize this way (which doesn't really matter anyway, since they are PUBLIC KEYS). It resolves to a pref…
But that's so much pain.
> The config file already does this, this is just a shortcut with %h and the file system structure.
No.
% ssh -F /dev/null -v whoami.filippo.io
debug1: Trying private key: /home/moviuro/.ssh/id_rsa
debug1: Trying private key: /home/moviuro/.ssh/id_ecdsa
debug1: Trying private key: /home/moviuro/.ssh/id_ecdsa_sk
debug1: Trying private key: /home/moviuro/.ssh/id_ed25519
debug1: Trying private key: /home/moviuro/.ssh/id_ed25519_sk
debug1: Trying private key: /home/moviuro/.ssh/id_xmss
debug1: Trying private key: /home/moviuro/.ssh/id_dsa