Changed known_hosts file location.
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user