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"