diff --git a/backup.sh b/backup.sh index 4ab31f4..3988909 100755 --- a/backup.sh +++ b/backup.sh @@ -23,6 +23,8 @@ if ! grep -q "${SSH_ALIAS}" /root/.ssh/config ; then echo " User ${SSH_USER}" >> /root/.ssh/config fi +touch /root/.ssh/known_hosts + if ! ssh-keygen -F "[${SSH_SERVER}]:${SSH_PORT}"; then echo "${SSH_KNOWN_HOSTS}" >> /root/.ssh/known_hosts fi