that's fine and dandy. but, if you have many hosts to check, this does the job...
there's a few assumptions:
1. you have a list of systems.
2. you have remote access to the systems.
3. you have pubkey access to the systems (say, root, but anyone will do).
#!/bin/bash
for host_name in $(cat systems); do
(echo * "${host_name}"
ssh -l root ${host_name} 'bash -s' < hotdamnscript.sh) >> output
echo "done ${host_name}"
done
mail -s 'be happy' you@there < output
No comments:
Post a Comment