diff --git a/configuration-files/community-provided/instance-configuration/01-associate-multiple-ssh-keys.config b/configuration-files/community-provided/instance-configuration/01-associate-multiple-ssh-keys.config new file mode 100644 index 0000000..cf6cb42 --- /dev/null +++ b/configuration-files/community-provided/instance-configuration/01-associate-multiple-ssh-keys.config @@ -0,0 +1,14 @@ + /home/ec2-user/.ssh/extra_authorized_keys: + mode: "000400" + owner: ec2-user + group: ec2-user + content: | + ssh-rsa EXAMPLE_PUBLIC_KEY + ssh-rsa ANOTHER_EXAMPLE_PUBLIC_KEY +commands: + 01_append_keys: + cwd: /home/ec2-user/.ssh/ + command: sort -u extra_authorized_keys authorized_keys -o authorized_keys + 99_rm_extra_keys: + cwd: /home/ec2-user/.ssh/ + command: rm extra_authorized_keys