Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions aws-ssm-ec2-proxy-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ aws ssm send-command \
--document-name 'AWS-RunShellScript' \
--comment "Add an SSH public key to authorized_keys for 60 seconds" \
--parameters commands="\"
mkdir -p ~/${ssh_user}/.ssh
cd ~/${ssh_user}/.ssh || exit 1
mkdir -p ~${ssh_user}/.ssh
cd ~${ssh_user}/.ssh || exit 1
authorized_key='${ssh_public_key} ssm-session'
echo \\\"\${authorized_key}\\\" >> authorized_keys
sleep 60
Expand Down