diff --git a/aws-ssm-ec2-proxy-command.sh b/aws-ssm-ec2-proxy-command.sh old mode 100644 new mode 100755 index 7ba74af..4ccefcb --- a/aws-ssm-ec2-proxy-command.sh +++ b/aws-ssm-ec2-proxy-command.sh @@ -52,7 +52,7 @@ aws ssm send-command \ --document-name 'AWS-RunShellScript' \ --comment "Add an SSH public key to authorized_keys for ${ssh_public_key_timeout} seconds" \ --parameters commands="\" - mkdir -p ~${ssh_user}/.ssh && cd $_ || exit 1 + mkdir -p ~${ssh_user}/.ssh && cd \$_ || exit 1 authorized_key='${ssh_public_key} ssm-session' echo \\\"\${authorized_key}\\\" >> authorized_keys