From bbffbf8306f52778f9184a87046591b760f90744 Mon Sep 17 00:00:00 2001 From: blackboxprogramming <118287761+blackboxprogramming@users.noreply.github.com> Date: Fri, 8 Aug 2025 02:10:13 -0500 Subject: [PATCH] part a --- ...oplet setup (run on root@159.65.43.12).ssh | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 scripts/Droplet setup (run on root@159.65.43.12).ssh diff --git a/scripts/Droplet setup (run on root@159.65.43.12).ssh b/scripts/Droplet setup (run on root@159.65.43.12).ssh new file mode 100644 index 0000000..0c85465 --- /dev/null +++ b/scripts/Droplet setup (run on root@159.65.43.12).ssh @@ -0,0 +1,22 @@ +This generates an ed25519 deploy key on the droplet, pins GitHub’s host keys, configures SSH to use the key, and prints the public key for you to paste into GitHub (Deploy Keys → Write access). + +# --- Phase A: key + ssh config --- +mkdir -p ~/.ssh && chmod 700 ~/.ssh +ssh-keygen -t ed25519 -f ~/.ssh/lucidia_deploy -N "" -C "lucidia-deploy@droplet" + +# Pin GitHub host keys so cron never hangs on prompts +ssh-keyscan -t rsa,ecdsa,ed25519 github.com >> ~/.ssh/known_hosts +chmod 644 ~/.ssh/known_hosts + +# Force this identity for github.com +cat > ~/.ssh/config <<'EOF' +Host github.com + HostName github.com + User git + IdentityFile ~/.ssh/lucidia_deploy + IdentitiesOnly yes +EOF +chmod 600 ~/.ssh/config + +echo "==== PUBLIC KEY (add to GitHub → Repo → Settings → Deploy Keys, name: lucidia-droplet, enable Write) ====" +cat ~/.ssh/lucidia_deploy.pub \ No newline at end of file