From 98db179f2be178244c74be2ea3b10b3b88202631 Mon Sep 17 00:00:00 2001 From: Raphael Numbus Date: Sun, 23 Nov 2025 21:08:15 +0100 Subject: [PATCH] Fixed SSH bad permissions. --- deploy.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/deploy.sh b/deploy.sh index 44ab6b9..9370090 100644 --- a/deploy.sh +++ b/deploy.sh @@ -70,10 +70,8 @@ necessary_credentials_with_config() { setup_ssh() { echo -e "\n\n ✅ Generating new SSH for numbus-admin..." mkdir -p extra-files/home/numbus-admin/.ssh/ - ssh-keygen -t "ed25519" -C "numbus-admin@numbus-server" -f "extra-files/home/numbus-admin/.ssh/id_ed25519" -N "" -q chmod 700 extra-files/home/numbus-admin/.ssh/ - chmod 600 extra-files/home/numbus-admin/.ssh/id_ed25519 - chmod 644 extra-files/home/numbus-admin/.ssh/id_ed25519.pub + ssh-keygen -t "ed25519" -C "numbus-admin@numbus-server" -f "extra-files/home/numbus-admin/.ssh/id_ed25519" -N "" -q REMOTE_PASS=$(gum input --password --placeholder "Enter password for 'nixos' on '$TARGET_HOST'") if [ -z "$REMOTE_PASS" ]; then @@ -81,7 +79,7 @@ setup_ssh() { exit 1 fi echo -e "\n\n ➡️ Copying SSH key to target host 'nixos@$TARGET_HOST'..." - if sshpass -p "$REMOTE_PASS" ssh-copy-id -o StrictHostKeyChecking=no -i "extra-files/home/numbus-admin/.ssh/id_ed25519.pub" "nixos@$TARGET_HOST"; then + if sshpass -p "$REMOTE_PASS" ssh-copy-id -o StrictHostKeyChecking=no -i "extra-files/home/numbus-admin/.ssh/id_ed25519" "nixos@$TARGET_HOST"; then echo " ✅ SSH key copied successfully." else echo " ❌ Failed to copy SSH key. Please check the host IP and password." @@ -91,7 +89,7 @@ setup_ssh() { } ssh_to_host() { - ssh -i "extra-files/home/numbus-admin/.ssh/id_ed25519.pub" "nixos@$TARGET_HOST" "$1" + ssh -i "extra-files/home/numbus-admin/.ssh/id_ed25519" "nixos@$TARGET_HOST" "$1" } hardware_detection() {