4 ms·
Practical question - let's say you spin new EC2 on AWS. This results in VM generating new host sshd key for this instance as part of bootstrapping new instance
by daemon13 13y ago
Practical question - let's say you spin new EC2 on AWS. This results in VM generating new host sshd key for this instance as part of bootstrapping new instance process.
How do you place host sshd key in DNS records without first connecting to this instance and getting the key, action which requires you to check/verify host sshd key (which is NOT in DNS yet)?
so it looks a bit like chicken and egg thing ...
What am I missing?
- saljam 13y agoI don't know about EC2 but Linode provide you with a web based console you can use to set stuff up.
- mrud 13y agoEither create the ssh host key outside and set it inside the image or integrate the new host into your configuration management and report the sshd host key back and export it to the zone database. Of course your AMI could also just automatically populate the DNS entry via some shared secret or API ...
- zorlem 13y agoThe way I can think of is using IAM credentials to allow modification of a Route53 record using the AWS CLI from the newly spun server. You will need to write a short script that you could push to the new instance either through EC2 MetaData or UserData fields. If there is a demand I could try whipping up a CloudFormation template to do it.