cloud-localds option to add SSH public key
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-utils |
Invalid
|
Wishlist
|
Unassigned |
Bug Description
I've written a script which creates a cloud-init seed ISO using the current user's pubkey as user-data.
It's currently at https:/
But perhaps this is something that cloud-localds could natively support out of the box already?
What if one could just use it WITHOUT having to hand write a user-data file, and it would generate it, given a public key (perhaps with options to choose which one, by ID or file name; as suggested in the ongoing review discussion of the Arch MR)?
Would a PR contribution proposing to add an option for this potentially be welcome in this project?
it seems like a fine idea, implementation details aside.
things to think about:
* it would be backwards incompatible to change the meaning of the arguments (user-data [meta-data]).
* if you add something like --ssh-keys=, then is that incompatible with providing user-data, or do you read and edit the provided user-data to insert the keys. what if there are already keys there? append, overwrite ...
its a fine idea, you just have to work out things like that.
I'd suggest that one thing you'd want to do is allow input into ssh-import-id, so that i could have it use my github or launchpad keys magically. I think its probably best in that path to retrieve the keys "client side" rather than using cloud-init's 'ssh_import_id' support.