diff --git a/system/clearpilot/on_start.sh b/system/clearpilot/on_start.sh index 9a5c527..7fc82dd 100755 --- a/system/clearpilot/on_start.sh +++ b/system/clearpilot/on_start.sh @@ -26,6 +26,18 @@ if [[ $serial == 3889765b ]] && [[ ! -f "$ssh_dir/id_ed25519" || ! -f "$ssh_dir/ echo "SSH identity keys installed to $ssh_dir" fi +# Ensure root SSH config has git.hanson.xyz entry +if ! grep -q "Host git.hanson.xyz" "$ssh_dir/config" 2>/dev/null; then + sudo tee -a "$ssh_dir/config" > /dev/null <<'SSHCFG' + +Host git.hanson.xyz + IdentityFile /root/.ssh/id_ed25519 + StrictHostKeyChecking no +SSHCFG + sudo chmod 600 "$ssh_dir/config" + echo "SSH config updated for git.hanson.xyz" +fi + # Always ensure WiFi radio is on nmcli radio wifi on 2>/dev/null