Skip to content

Instantly share code, notes, and snippets.

@koyakei
Created May 15, 2018 23:02
Show Gist options
  • Save koyakei/6ee4dc399952d1898396dd63d615d8ae to your computer and use it in GitHub Desktop.
Save koyakei/6ee4dc399952d1898396dd63d615d8ae to your computer and use it in GitHub Desktop.
packages:
yum:
python27-devel: []
python27-pip: []
gcc: []
python:
pycrypto: []
boto3: []
files:
"/usr/local/bin/get_authorized_keys" :
mode: "000755"
owner: root
group: root
source: https://s3-ap-northeast-1.amazonaws.com/awscodestar-remote-access-ap-northeast-1/get_authorized_keys
commands:
01_update_ssh_access:
command: >
sed -i '/AuthorizedKeysCommand /s/.*/AuthorizedKeysCommand \/usr\/local\/bin\/get_authorized_keys/g' /etc/ssh/sshd_config &&
sed -i '/AuthorizedKeysCommandUser /s/.*/AuthorizedKeysCommandUser root/g' /etc/ssh/sshd_config &&
/etc/init.d/sshd restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment