Skip to content

Commit c74aa91

Browse files
authored
Update aws-ssm-ec2-proxy-command.ps1
1 parent f852a10 commit c74aa91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aws-ssm-ec2-proxy-command.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ if ($splitted_instance.Length -gt 1)
5050
}
5151

5252
Write-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"
7171
if($LASTEXITCODE -ne 0) { Write-Error "Failed to add public key with error $output" }
7272

7373
Write-Output "Start ssm session to instance $ec2_instance_id"

0 commit comments

Comments
 (0)