[root@MATX01LIMO01 ~]# ssh-keygen
[root@MATX01LIMO01 ~]# cat /root/.ssh/id_rsa.pub | ssh [email protected] 'cat >> /etc/ssh/keys-root/authorized_keys'
[root@MATX01LIMO01 ~]# cat /root/.ssh/id_rsa.pub | ssh [email protected] 'cat >> /etc/ssh/keys-root/authorized_keys'
[root@MATX01LIMO01 ~]# cat /root/.ssh/id_rsa.pub | ssh [email protected] 'cat >> /etc/ssh/keys-root/authorized_keys'
[root@MATX01LIMO01 ~]# cat snapshot-check.sh
#!/bin/bash
servers=(
matx01vmvh01.nerdydrunk.net
matx01vmvh02.nerdydrunk.net
matx01vmvh03.nerdydrunk.net
)
echo -e "\n"
date
echo -e "\n\nChecking for snapshots on the following hosts:"
printf "\n -%s\n" "${servers[@]}"
for i in "${servers[@]}"
do
echo -e "\n\nChecking $i:"
echo -e "\n -000"
ssh root@$i "find /vmfs/volumes/ -type f -name \*0000*.vmdk" | grep -v delta
echo -e "\n -delta"
ssh root@$i "find /vmfs/volumes/ -type f -name \*0000*delta*.vmdk"
echo -e "\n -vmsn"
ssh root@$i "find /vmfs/volumes/ -type f -name \*.vmsn"
done
echo -e "\n"
[root@MATX01LIMO01 ~]#