Which scripting language to use to asynchronously ssh into equipment, run several commands, parse the output, and save to a file on my computer?
- by Fujin
There are several points I'd like to stress in my question.
I'd like to login by asynchronously ssh'ing into our infrastructure equipment. Meaning, I do not want to connect to only one device, do all the tasks I need, disconnect, then connect to the next device. I want to connect to several devices at once in order to make the process as fast as possible.
By equipment I mean 'infrastructure equipment' and not servers. I say this because I will not have the luxury of saving files to the device then transferring them to myself with scp or another method. The output of the scripts that are run will have to be saved directly to my computer.
The output of the commands that are run will need to be cleaned up and parsed. Also I want the outputs of each device to be combined into one nice and neat file, not a separate file for each device.
This will all be done from a linux box, using ssh, into devices that all use linux'ish proprietary OSes.
My guess is the answer to my question will either be a Bash, Perl, or Python script but I figured it wouldn't hurt to ask and to hear the reasons why one way is better than another.
Thanks everyone.
EXTRA CREDIT:
With you answer, include links to resources that will help create the script I described in the language that you suggested.