Wednesday, January 28, 2015

systematic hot damn checking

in a previous post, like an hour ago, i posted a script that checked for the new ghost vulnerability.
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).
 for host_name in $(cat systems); do  
     (echo * "${host_name}"   
     ssh -l root ${host_name} 'bash -s' < >> output  
     echo "done ${host_name}"  
 mail -s 'be happy' you@there < output  
Post a Comment