rosdump: ignore ssh host keys

This commit is contained in:
2025-06-28 01:33:48 +00:00
committed by rasmus
parent 94751c44f9
commit 0d18bfd7cc

View File

@@ -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