diff --git a/script/deploy.sh b/script/deploy.sh index 4286403..2ad479b 100755 --- a/script/deploy.sh +++ b/script/deploy.sh @@ -130,7 +130,7 @@ setup_ssh() { If you are unsure, it is always better to check manually.\n" gum confirm "Remove the old fingerprint and accept the new one ?" || { echo -e "\n\n ❌ SSH fingerprints don't match."; exit 22; } - sed -i '/${LIVE_TARGET_IP}/d' "~/.ssh/known_hosts" + sed -i '/${LIVE_TARGET_IP}/d' "/home/${USER}/.ssh/known_hosts" fi if sshpass -p "${LIVE_TARGET_PASSWORD}" ssh-copy-id -o StrictHostKeyChecking=no -i "${TMP_EXTRA_PATH}/home/numbus-admin/.ssh/id_ed25519" "${TARGET_USER}@${LIVE_TARGET_IP}" >> "${STDOUT}" 2>> "${STDERR}"; then