Created
May 15, 2018 23:02
-
-
Save koyakei/6ee4dc399952d1898396dd63d615d8ae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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