❯ en / ssh-onboarding-via-ard

Onboard SSH across the fleet via Apple Remote Desktop

No MDM? Use Apple Remote Desktop as a bootstrap channel to turn every classroom Mac into passwordless SSH-key management, while avoiding the common pitfalls.

⭐ Onboard SSH across the fleet via Apple Remote Desktop

In an environment with no MDM and Macs scattered across classrooms, use Apple Remote Desktop (ARD) as a bootstrap channel to turn the whole fleet into “managed by SSH key, passwordless” — while dodging every landmine on the way.

This is the toolkit’s core capability: going from “click around in ARD” to “manage the whole school with one command.”


1. Standard procedure

Step 1 — Prepare local config and key

python3 setup/init-wizard.py

The wizard generates your management key (keys/admin_ed25519, never committed) and writes config/.

Step 2 — Use ARD “Send UNIX Command” to bootstrap every machine

Select all targets in ARD → Manage > Send UNIX Command, run as root (replace PUBKEY with your keys/admin_ed25519.pub contents and ADMINUSER with your account):

#!/bin/bash
set -e
ADMINUSER="itadmin"
PUBKEY="ssh-ed25519 AAAA....your-public-key.... school-it-toolkit"

# 1) Create the unified admin account if missing
if ! id "$ADMINUSER" >/dev/null 2>&1; then
  sysadminctl -addUser "$ADMINUSER" -fullName "School Admin" -admin -password - <<<"CHANGE_ME_TEMP_PASS"
fi
# 2) Enable Remote Login (SSH)
systemsetup -setremotelogin on
# 3) Install the public key
HOME_DIR=$(dscl . -read /Users/$ADMINUSER NFSHomeDirectory | awk '{print $2}')
mkdir -p "$HOME_DIR/.ssh"
echo "$PUBKEY" >> "$HOME_DIR/.ssh/authorized_keys"
sort -u "$HOME_DIR/.ssh/authorized_keys" -o "$HOME_DIR/.ssh/authorized_keys"
chmod 700 "$HOME_DIR/.ssh"; chmod 600 "$HOME_DIR/.ssh/authorized_keys"
chown -R "$ADMINUSER" "$HOME_DIR/.ssh"

Step 3 — Verify over SSH (the real success criterion)

tools/mac-fleet/school-ssh --group all -- "whoami; sw_vers -productVersion"

ARD reporting “submitted” does not mean success. Judge by whether SSH logs in.

Step 4 — Everything via SSH afterwards

Use school-ssh, school-brew, etc. — no more ARD GUI.


2. Landmines & how to dodge them (battle-tested)

See ../zh-TW/pitfalls.md for the full catalogue (zh-TW).