Hacker News new | ask | show | jobs
by wraithm112 2275 days ago
At least on AWS, you can parse the System Console Output. On the first boot, the box dumps its pub keys there. We have a tool that parses the output:

https://github.com/bitnomial/aws-ec2-knownhosts

Right now, this is pretty specific to our use of it, specifically our use with Terraform EC2 instances. We'd happily suggest changes to make it more generic. But you can see the parsing logic there.