how can I place a key in a AWS RHEL instance with "user data" ?

Posted on 2018-03-08
Medium Priority
Last Modified: 2018-03-09
how can I place a key in a AWS RHEL instacne with "user data"

is it possible to create a "here" script and have it execute on AWS instance "user data"?

like this

user data with a bash script in it#!/usr/bin/env bash
mkdir -p /home/ec2-user/.ssh
cat <<EOF >  /home/ec2-user/.ssh/docker-master-key.pem

I want to be able to pass a key to an instance upon boot, I have used just this above and it does not seem to do anything at all , I can not find any errors , how can I find out logging from this user data ?

Question by:NAMEWITHELD12

Featured Post

We Need Your Input!

WatchGuard is currently running a beta program for our new macOS Host Sensor for our Threat Detection and Response service. We're looking for more macOS users to help provide insight and feedback to help us make the product even better. Please sign up for our beta program today!

Join & Write a Comment

Media Temple is thrilled to announce the launch of our new Partner Program, specifically designed to empower digital agencies and adtech platforms by offering white-glove support and exclusive hosting enhancements to optimize their sites and their c…
Cloud computing is a model of provisioning IT services. By combining many servers into one large pool and providing virtual machines from that resource pool, it provides IT services that let customers acquire resources at any time and get rid of the…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Is your organization moving toward a cloud and mobile-first environment? In this transition, your IT department will encounter many challenges, such as navigating how to: Deploy new applications and services to a growing team Accommodate employee…

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question