Install OpenSSH Server from the Win32-OpenSSH zip

Carry the zip for the host architecture in the seed ISO and add
06-Install-OpenSSH-Zip-Admin.bat, which installs from it instead of
Windows Update. Update vm-images.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GuofangandClaude Sonnet 5.5 committed 2026-10-19 14:28:13 +08:00
1 parent 07355a41f1
commit 552a292894
6 files changed
+93 -5

No files matched your search

+8
View File
@@ -10,6 +10,13 @@ case "$arch" in
*) printf 'Error: unsupported architecture: %s\n' "$arch" >&2; exit 1 ;;
esac
# The OpenSSH zip for the target architecture comes from the shared image
# helper, which downloads it when missing.
image_helper="${VM_IMAGE_HELPER:-$script_dir/../../vm-images/download-images.sh}"
openssh_zip="$(VM_IMAGE_ARCH="$answer_arch" "$image_helper" --print-path openssh-win)"
[[ -s "$openssh_zip" ]] || VM_IMAGE_ARCH="$answer_arch" "$image_helper" openssh-win
[[ -s "$openssh_zip" ]] || { printf 'Error: %s was not downloaded.\n' "$openssh_zip" >&2; exit 1; }
# The answer file's components name the processor architecture, so render a
# copy for the target architecture.
work_dir="$(mktemp -d)"
@@ -20,6 +27,7 @@ sed "s/processorArchitecture=\"amd64\"/processorArchitecture=\"${answer_arch}\"/
seed_files=(
"$work_dir/Autounattend.xml"
"$script_dir/Configure-Windows.ps1"
"$openssh_zip"
)
# Numbered installer scripts (10-Install-Git-Admin.bat, 20-..., in install order).
shopt -s nullglob