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 @@ -50,7 +50,7 @@ if ($splitted_instance.Length -gt 1)
5050}
5151
5252Write-Output " Add public key $ssh_public_key_path for $ssh_user at instance $ec2_instance_id for $ssh_public_key_timeout seconds"
53- $addPublicKeyScript = @"
53+ $addPublicKeyCommands = @"
5454 \"
5555 mkdir -p ~$ssh_user /.ssh && cd ~$ssh_user /.ssh || exit 1
5656
@@ -67,7 +67,7 @@ aws ssm send-command `
6767 -- instance- ids " $ec2_instance_id " `
6868 -- document- name ' AWS-RunShellScript' `
6969 -- comment " Add an SSH public key to authorized_keys for $ssh_public_key_timeout seconds" `
70- -- parameters commands= " $addPublicKeyScript "
70+ -- parameters commands= " $addPublicKeyCommands "
7171if ($LASTEXITCODE -ne 0 ) { Write-Error " Failed to add public key with error $output " }
7272
7373Write-Output " Start ssm session to instance $ec2_instance_id "
You can’t perform that action at this time.
0 commit comments