Sign in
Categories
Your Saved List Become a Channel Partner Sell in AWS Marketplace Amazon Web Services Home Help

Clean and with cloud-init support

  • By Florent Dutheil
  • on 11/05/2015

I was struggling getting a shell script in EC2 user-data to work, when I realized I was using deprecated official CentOS AMIs that was lacking cloud-init support. I upgraded to this one (thanks to the official documentation: https://wiki.centos.org/Cloud/AWS) and I'm happy to see it is already included.
So, OK, maybe root ssh login is disabled, but nothing prevents you from getting it back using a small user-data script:
#!/bin/bash
sed -i -e 's/^.*\(ssh.*$\)/\1/' /root/.ssh/authorized_keys


There are no comments to display