setup-spoke.sh: replace ~ with full paths and clarify hub user in completion message

This commit is contained in:
Justin Oros
2026-04-19 14:07:17 -07:00
parent 0553420d04
commit e5bdf95dcf

View File

@@ -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 " Tunnel port: ${GREEN}$TUNNEL_PORT${NC} on $HUB_HOST"
echo -e " SSH key: ${GREEN}$KEY_PATH${NC}" echo -e " SSH key: ${GREEN}$KEY_PATH${NC}"
echo "" 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 ""
echo " 1. Generate a hub->spoke key:" 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 ""
echo " 2. Copy it to this spoke through the tunnel:" 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 ""
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 " [${SPOKE_NAME}-remote]"
echo " type = sftp" echo " type = sftp"
echo " host = localhost" echo " host = localhost"
echo " port = $TUNNEL_PORT" 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 " shell_type = unix"
echo " md5sum_command = md5sum" echo " md5sum_command = md5sum"
echo " sha1sum_command = sha1sum" echo " sha1sum_command = sha1sum"