Skip to content

Instantly share code, notes, and snippets.

@kawaz
Created December 17, 2015 09:07
Show Gist options
  • Save kawaz/e0e2cbf89361732878ff to your computer and use it in GitHub Desktop.
Save kawaz/e0e2cbf89361732878ff to your computer and use it in GitHub Desktop.
install ssm-agent, stop sshd
#!/bin/bash
region=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/[a-z]$//')
for o in install update; do
yum $o -y https://amazon-ssm-$region.s3.amazonaws.com/latest/linux_amd64/amazon-ssm-agent.rpm && break
done
/sbin/chkconfig sshd off
/sbin/service sshd stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment