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