mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 14:10:49 -05:00
Returns a console log carrying the instance's SSH host public keys between the markers cloud-init prints, read from the running instance container, so clients can verify the host before connecting. An instance without a running container has an empty log. Look the instance up in the request's region, read host keys only from a running container and treat a failed read as an empty log, build the response with XmlBuilder, and cover the SDK reading of the response. AWS returns DryRunOperation for DryRun=true even for an empty or malformed instance id, so check the dry run first. The key files are the guest's to write, so capture at most 16 KiB of stdout (and 1 KiB of stderr) through bounded streams, and answer an empty log, with a warning, when the output is larger than host keys can be.