Changed known_hosts file location.

This commit is contained in:
Raphaël Numbus
2026-05-29 16:04:04 +02:00
parent 9376a87caa
commit 92e0f077a4
+1 -1
View File
@@ -130,7 +130,7 @@ setup_ssh() {
If you are unsure, it is always better to check manually.\n" 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; } 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 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 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