Add copy host known hosts to borg-client
This commit is contained in:
parent
05bfef728b
commit
ec6731f752
1 changed files with 12 additions and 0 deletions
|
|
@ -300,6 +300,12 @@ in
|
|||
cp -r /home/yanlin/.ssh/keys /root/.ssh/
|
||||
chmod -R 600 /root/.ssh/keys
|
||||
fi
|
||||
|
||||
# Copy known_hosts to avoid host key verification issues
|
||||
if [ -f /home/yanlin/.ssh/known_hosts ]; then
|
||||
cp /home/yanlin/.ssh/known_hosts /root/.ssh/known_hosts
|
||||
chmod 600 /root/.ssh/known_hosts
|
||||
fi
|
||||
fi
|
||||
|
||||
# Pre-hook
|
||||
|
|
@ -475,6 +481,12 @@ in
|
|||
cp -r /home/yanlin/.ssh/keys /root/.ssh/
|
||||
chmod -R 600 /root/.ssh/keys
|
||||
fi
|
||||
|
||||
# Copy known_hosts to avoid host key verification issues
|
||||
if [ -f /home/yanlin/.ssh/known_hosts ]; then
|
||||
cp /home/yanlin/.ssh/known_hosts /root/.ssh/known_hosts
|
||||
chmod 600 /root/.ssh/known_hosts
|
||||
fi
|
||||
fi
|
||||
|
||||
# Run the integrity check script
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue