diff --git a/script/deploy.sh b/script/deploy.sh index 24eaee5..67a2b0a 100755 --- a/script/deploy.sh +++ b/script/deploy.sh @@ -101,7 +101,7 @@ setup_ssh() { echod "\n ➡️ Copying SSH key to target host '${TARGET_USER}@${LIVE_TARGET_IP}'..." - if cat "/home/${USER}/.ssh/known_hosts" | grep "${LIVE_TARGET_IP}"; then + if cat "/home/${USER}/.ssh/known_hosts" | grep "${LIVE_TARGET_IP}" >> "${STDOUT}" 2>> "${STDERR}"; then echo -e "\n ⚠️ The SSH fingerprint for the selected IP address $(gum style --italic "\"${LIVE_TARGET_IP}\"") is not the same as the one in $(gum style --italic "\".ssh/known_hosts\""). This could occur for multiple reasons : @@ -113,7 +113,7 @@ setup_ssh() { The script $(gum style --bold "cannot continue") without the correct fingerprint installed. 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 ❌ Exiting."; 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" fi