Skip to content

Commit fcf3ce1

Browse files
authored
Need to escape the variable so you get the last arg of mkdir, not the last command which would be the echo (#10)
1 parent 39f956c commit fcf3ce1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

aws-ssm-ec2-proxy-command.sh

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ aws ssm send-command \
5252
--document-name 'AWS-RunShellScript' \
5353
--comment "Add an SSH public key to authorized_keys for ${ssh_public_key_timeout} seconds" \
5454
--parameters commands="\"
55-
mkdir -p ~${ssh_user}/.ssh && cd $_ || exit 1
55+
mkdir -p ~${ssh_user}/.ssh && cd \$_ || exit 1
5656
5757
authorized_key='${ssh_public_key} ssm-session'
5858
echo \\\"\${authorized_key}\\\" >> authorized_keys

0 commit comments

Comments
 (0)