From 94ff855497804cd3ebdbc5d97602197f55961cc2 Mon Sep 17 00:00:00 2001 From: Jochen Welzel Date: Mon, 18 Jan 2021 18:00:30 +0100 Subject: [PATCH] disable strict hostkey checking --- scp_and_reload.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scp_and_reload.sh b/scp_and_reload.sh index 15a2671..da92af8 100644 --- a/scp_and_reload.sh +++ b/scp_and_reload.sh @@ -11,14 +11,14 @@ echo "Changed files: $CHFILENAMES" for file in $CHFILENAMES; do if [[ $file == *"zone" ]]; then echo "SCP of $file started" - scp $file "$PLUGIN_USER"@"$PLUGIN_HOSTS":"$PLUGIN_TARGET"/$file + scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $file "$PLUGIN_USER"@"$PLUGIN_HOSTS":"$PLUGIN_TARGET"/$file if [ $? -ne 0 ]; then echo "SCP failed" 1>&2 exit 1 fi ZONE=$(echo $file | sed 's/\.zone//') echo "Reload $ZONE zone" - ssh "PLUGIN_USER"@"$PLUGIN_HOSTS" nsd-control reload $ZONE + ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null "PLUGIN_USER"@"$PLUGIN_HOSTS" nsd-control reload $ZONE if [ $? -ne 0 ]; then echo "Reload of zone failed" 1>&2 exit 1