We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b7447f7 + 0aedcc0 commit 0974e34Copy full SHA for 0974e34
aws-ssm-ec2-proxy-command.sh
@@ -51,7 +51,8 @@ aws ssm send-command \
51
--document-name 'AWS-RunShellScript' \
52
--comment "Add an SSH public key to authorized_keys for 60 seconds" \
53
--parameters commands="\"
54
- cd ~${ssh_user}/.ssh || exit 1
+ mkdir -p ~/${ssh_user}/.ssh
55
+ cd ~/${ssh_user}/.ssh || exit 1
56
authorized_key='${ssh_public_key} ssm-session'
57
echo \\\"\${authorized_key}\\\" >> authorized_keys
58
sleep 60
0 commit comments