Wanted: ssh-authorize
Step 1
Create and publish a cross-platform command to add a key to ~/.ssh/authorized_keys, and set the permissions properly if they are incorrect.
ssh-authorize single-key.pub
# add multiple keys
ssh-authorize https://coolaj86.com/authorized_keys
Bonus: check that the keys aren't already added.
This would be a great project to write in Rust - especially if it doesn't require the extra visual studio runtime libraries - or otherwise Go.
I suppose separate commands in Powershell and Bash could suffice too, if need be.
Step 2
Make a PR to add the installer to Webi, using https://github.com/webinstall/webi-installers/tree/main/keypairs or https://github.com/webinstall/webi-installers/tree/main/ssh-pubkey as a template.
Is this helpful? https://man.openbsd.org/ssh-keyscan.1
Something like ...
ssh-authorize https://ryanburnette.com/pubkey
... would be cool.
Is this helpful? https://man.openbsd.org/ssh-keyscan.1
No. That gets the keys of the servers you want to connect to, not the ones you want to connect from.
@ryanburnette How's that 1Password thing work again?
https://developer.1password.com/docs/ssh/agent/