From e5bdf95dcf8d829a019aac97ba420e8b4c96a6a1 Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Sun, 19 Apr 2026 14:07:17 -0700 Subject: [PATCH 1/2] setup-spoke.sh: replace ~ with full paths and clarify hub user in completion message --- spoke/setup-spoke.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spoke/setup-spoke.sh b/spoke/setup-spoke.sh index 2390191..0e28eed 100755 --- a/spoke/setup-spoke.sh +++ b/spoke/setup-spoke.sh @@ -405,20 +405,22 @@ echo -e " Spoke name: ${GREEN}$SPOKE_NAME${NC}" echo -e " Tunnel port: ${GREEN}$TUNNEL_PORT${NC} on $HUB_HOST" echo -e " SSH key: ${GREEN}$KEY_PATH${NC}" echo "" -echo -e "${YELLOW}The hub owner needs to do the following on ${HUB_HOST}:${NC}" +echo -e "${YELLOW}The hub owner needs to do the following on ${HUB_HOST} as ${HUB_USER}:${NC}" +echo "" +echo " NOTE: Run all commands below as ${HUB_USER}, not root." echo "" echo " 1. Generate a hub->spoke key:" -echo " ssh-keygen -t ed25519 -f ~/.ssh/${HUB_USER}-${SPOKE_NAME}-$(date +%Y%m)" +echo " ssh-keygen -t ed25519 -f /home/${HUB_USER}/.ssh/${HUB_USER}-${SPOKE_NAME}-$(date +%Y%m)" echo "" echo " 2. Copy it to this spoke through the tunnel:" -echo " ssh-copy-id -i ~/.ssh/${HUB_USER}-${SPOKE_NAME}-$(date +%Y%m).pub -p $TUNNEL_PORT ${HUB_USER}@localhost" +echo " ssh-copy-id -i /home/${HUB_USER}/.ssh/${HUB_USER}-${SPOKE_NAME}-$(date +%Y%m).pub -p $TUNNEL_PORT ${HUB_USER}@localhost" echo "" -echo " 3. Add an rclone remote in ~/.config/rclone/rclone.conf:" +echo " 3. Add an rclone remote in /home/${HUB_USER}/.config/rclone/rclone.conf:" echo " [${SPOKE_NAME}-remote]" echo " type = sftp" echo " host = localhost" echo " port = $TUNNEL_PORT" -echo " key_file = /home/$HUB_USER/.ssh/${HUB_USER}-${SPOKE_NAME}-$(date +%Y%m)" +echo " key_file = /home/${HUB_USER}/.ssh/${HUB_USER}-${SPOKE_NAME}-$(date +%Y%m)" echo " shell_type = unix" echo " md5sum_command = md5sum" echo " sha1sum_command = sha1sum" From 5a9e55b67313fc1d3484a821a3635e246b5b6b57 Mon Sep 17 00:00:00 2001 From: Justin Oros Date: Sun, 19 Apr 2026 14:09:30 -0700 Subject: [PATCH 2/2] setup-spoke.sh: replace manual hub instructions with onboard-spoke.sh next step prompt --- spoke/setup-spoke.sh | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/spoke/setup-spoke.sh b/spoke/setup-spoke.sh index 0e28eed..ff9781f 100755 --- a/spoke/setup-spoke.sh +++ b/spoke/setup-spoke.sh @@ -405,23 +405,7 @@ echo -e " Spoke name: ${GREEN}$SPOKE_NAME${NC}" echo -e " Tunnel port: ${GREEN}$TUNNEL_PORT${NC} on $HUB_HOST" echo -e " SSH key: ${GREEN}$KEY_PATH${NC}" echo "" -echo -e "${YELLOW}The hub owner needs to do the following on ${HUB_HOST} as ${HUB_USER}:${NC}" +echo -e "${YELLOW}Next step — on the hub, run as ${HUB_USER}:${NC}" echo "" -echo " NOTE: Run all commands below as ${HUB_USER}, not root." -echo "" -echo " 1. Generate a hub->spoke key:" -echo " ssh-keygen -t ed25519 -f /home/${HUB_USER}/.ssh/${HUB_USER}-${SPOKE_NAME}-$(date +%Y%m)" -echo "" -echo " 2. Copy it to this spoke through the tunnel:" -echo " ssh-copy-id -i /home/${HUB_USER}/.ssh/${HUB_USER}-${SPOKE_NAME}-$(date +%Y%m).pub -p $TUNNEL_PORT ${HUB_USER}@localhost" -echo "" -echo " 3. Add an rclone remote in /home/${HUB_USER}/.config/rclone/rclone.conf:" -echo " [${SPOKE_NAME}-remote]" -echo " type = sftp" -echo " host = localhost" -echo " port = $TUNNEL_PORT" -echo " key_file = /home/${HUB_USER}/.ssh/${HUB_USER}-${SPOKE_NAME}-$(date +%Y%m)" -echo " shell_type = unix" -echo " md5sum_command = md5sum" -echo " sha1sum_command = sha1sum" +echo " cd tinyboard && ./setup.sh # choose option 2 (onboard spoke)" echo ""