File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 4646 ec2_instance_id=" ${ec2_instance_id%% ${REGION_SEPARATOR} * } "
4747fi
4848
49- > /dev/stderr echo " Add public key ${ssh_public_key_path} to instance ${ec2_instance_id} for 60 seconds"
49+ > /dev/stderr echo " Add public key ${ssh_public_key_path} for ${ssh_user} at instance ${ec2_instance_id} for ${ssh_public_key_timeout} seconds"
5050aws ssm send-command \
5151 --instance-ids " ${ec2_instance_id} " \
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 ~ ${ssh_user} /.ssh || exit 1
5656
5757 authorized_key='${ssh_public_key} ssm-session'
5858 echo \\\"\$ {authorized_key}\\\" >> authorized_keys
You can’t perform that action at this time.
0 commit comments