rosdump: ignore ssh host keys
This commit is contained in:
@@ -9,6 +9,7 @@ data:
|
||||
mkdir -p /root/.ssh
|
||||
cp /config/ssh_identity /root/.ssh/id_ecdsa
|
||||
chmod 600 /root/.ssh/id_ecdsa
|
||||
ssh-keyscan git.k-space.ee > /root/.ssh/known_hosts
|
||||
if [ -d rosdump ]; then
|
||||
echo "Pulling Git repo"
|
||||
cd rosdump
|
||||
@@ -23,6 +24,7 @@ data:
|
||||
git rm *.k-space.ee
|
||||
for target in $(cat /config/targets | grep -v '^#'); do
|
||||
echo "Exporting configuration for $target"
|
||||
ssh-keyscan $target >> /root/.ssh/known_hosts
|
||||
ssh rosdump@$target '/export' | grep -v '^# serial number =' | grep -v '^#.* by RouterOS' > $target
|
||||
git add $target
|
||||
done
|
||||
|
Reference in New Issue
Block a user