Debian has a package ssh-import-id
which you can then run ssh-import-id-gh $githubUsername
and it will ingest all the public keys you’ve put in GitHub. Should be able to easily add it to the cloud-init.yaml
but I just always install and run this first.
You can also just copy the keys to the install when you are imaging the SD card.
Or use Ansible.
Chezmoi has an amazing templating feature to address different files on different machines. It’s worth the time to set up.