I am debugging creation of a custom AMI and it's not clear to me how EC2 actually installs the public key of your keypair onto your AMI... I presume it goes into ~someuser/.ssh/authorized_keys, but I cannot figure out if this is done exactly once, on every boot, or how the target user is determined.
Join Stack Overflow to learn, share knowledge, and build your career.
|
|
More specifically You can browse through the code here:
They parts that get the key are the The find the list of keys using that URL and then pick them up one of by one. (It's usually one). Ultimately they query: The default cloud-init user (as well as all the cloud-init config) is defined in the /etc/cloud/cloud.cfg file. This in excerpt of a cloud.cfg file:
It's basically a For more information on cloud-init you can read their public docs here: http://cloudinit.readthedocs.org/en/latest/index.html Hope this helps. |
|||||
|