Skip to content

Commit

Permalink
GEODE-9244: Fix SSH passwordless login for windows (apache#6450)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbadler authored May 6, 2021
1 parent 9ba75f0 commit 267a434
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ci/scripts/create_instance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,12 @@ else

winrm -hostname ${INSTANCE_IP_ADDRESS} -username geode -password "${PASSWORD}" \
-https -insecure -port 5986 \
"powershell -command \"&{ mkdir c:\users\geode\.ssh -force; set-content -path c:\users\geode\.ssh\authorized_keys -encoding utf8 -value '${KEY}' }\""
"powershell -command \"&{\
\$authPath = (Join-Path \$env:ProgramData -ChildPath 'ssh') \
; \$authFile = (Join-Path \$authPath 'administrators_authorized_keys') \
; mkdir \$authPath -force\
; add-content -path \$authFile -encoding utf8 -value '${KEY}'\
; icacls \$authFile /inheritance:r /grant 'SYSTEM:(F)' /grant 'BUILTIN\Administrators:(F)' }\""

if [[ ${USE_SCRATCH_SSD} == "true" ]]; then
set +e
Expand Down

0 comments on commit 267a434

Please sign in to comment.