From 9c3764c7ff41dfcbf7ea1c209a652cb3e41ec42b Mon Sep 17 00:00:00 2001 From: Matthias Bilger Date: Thu, 27 May 2021 10:21:33 +0200 Subject: [PATCH] disabled hostkey check --- backup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup.sh b/backup.sh index cc5f1c5..ea6a09b 100644 --- a/backup.sh +++ b/backup.sh @@ -62,14 +62,14 @@ echo "uploading" if [ "$USE_SFTP" -eq 1 ]; then echo "use sftp" cd ~/ - sshpass -e sftp -oBatchMode=no ${SFTP_EXTRA} -b - ${SFTP_USER}@${SFTP_HOST} << ! + sshpass -e sftp -oStrictHostKeyChecking=no -oBatchMode=no ${SFTP_EXTRA} -b - ${SFTP_USER}@${SFTP_HOST} << ! cd ${SFTP_PATH} put ${BACKUP_FILENAME}.gpg bye ! if [ "$month_day" -eq 1 ] ; then echo "make monthly backup" - sshpass -e sftp -oBatchMode=no ${SFTP_EXTRA} -b - ${SFTP_USER}@${SFTP_HOST} << ! + sshpass -e sftp -oStrictHostKeyChecking=no -oBatchMode=no ${SFTP_EXTRA} -b - ${SFTP_USER}@${SFTP_HOST} << ! cd ${SFTP_PATH} cp ${BACKUP_FILENAME}.gpg ${BACKUP_FILENAME_MONTHLY}.gpg bye