From e28fa26c43cd7befa341f0855da55d899d4afce0 Mon Sep 17 00:00:00 2001 From: Mariusz Kogen Date: Thu, 23 Jan 2025 22:41:44 +0100 Subject: [PATCH] Set proper group permissions and enable ssh-copy-id password prompt (#2817) --- build/lib/scripts/wg-vps-setup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/lib/scripts/wg-vps-setup b/build/lib/scripts/wg-vps-setup index 3dc4fd179..7c7d55095 100755 --- a/build/lib/scripts/wg-vps-setup +++ b/build/lib/scripts/wg-vps-setup @@ -24,7 +24,7 @@ check_root() { if [[ "$EUID" -ne 0 ]]; then exec sudo "$0" "${SCRIPT_ARGS[@]}" fi - sudo chown -R start9:start9 "$SSH_KEY_DIR" + sudo chown -R start9:startos "$SSH_KEY_DIR" } # Function to print banner @@ -274,7 +274,7 @@ echo "SSH Port: $SSH_PORT" echo -e "\n${GREEN}Proceeding with SSH key-based authentication...${NC}\n" # Copy SSH public key to the remote server -if ! ssh-copy-id -i "$SSH_PUBLIC_KEY" -o StrictHostKeyChecking=no -p "$SSH_PORT" "$SSH_USER@$VPS_IP" >/dev/null 2>&1; then +if ! ssh-copy-id -i "$SSH_PUBLIC_KEY" -o StrictHostKeyChecking=no -p "$SSH_PORT" "$SSH_USER@$VPS_IP"; then echo -e "${RED}Failed to copy SSH key to the remote server. Please ensure you have correct credentials.${NC}" exit 1 fi