hypriot / device-init

Initialize a device on boot with user defined configuration
MIT License
70 stars 17 forks source link

Insert SSH pub keys #7

Closed StefanScherer closed 7 years ago

StefanScherer commented 8 years ago

It would be super convenient for the flash script that it can add SSH pub keys while flashing that are inserted in the user's ~/.ssh/authorized_keys file.

Only a rough idea how that could look like in the device-init.yml file:

ssh:
  authorized_keys:
    root:
      - "sha-rsa AAA...NN"
    pirate:
      - "sha-rsa AAA...NN"
DieterReuter commented 8 years ago

Great idea. And I would suggest to use the same or at least a similar syntax style like we can found in other projects too: http://docs.rancher.com/os/cloud-config/#ssh-keys.

marcellodesales commented 8 years ago

@DieterReuter Rancher updated their link http://docs.rancher.com/os/configuration/ssh-keys/... @StefanScherer any idea when this will get done? How can someone contribute with this?

StefanScherer commented 8 years ago

@marcellodesales Thanks for the new link. I really like the idea of cloud-init. Perhaps instead of writing all the code again we could have a look if these parts could be done with cloud-init on a RPi.

Contributing to device-init is possible by forking the repo and adding this to TravisCI or running the build steps https://github.com/hypriot/device-init/blob/45123327e991853446117ebc900387f85bceae01/.travis.yml#L6-L7 locally on your laptop, no RPi needed for that.

marcellodesales commented 8 years ago

@StefanScherer Sounds good! Thank you for the note! I will try to take a stab on it this weekend if anybody else doesn't...!

alexellis commented 7 years ago

Yes definitely a good idea @StefanScherer - this is a must-have for cloud-init so would be very useful.

StefanScherer commented 7 years ago

Closing as we switch over to cloud-init/cloud-config's user-data file.