Hello Monks,
I have created a script that can run in parallel multiple ssh connections, I am using the Net::OpenSSH::Parallel module for my task. Well my problem now is that I do not know if there is a way to apply multiple ssh connections to different primary servers, and as a second step I need to apply ssh connections to secondary servers and execute a set of commands.
Update: Primary and secondary servers are first and second line of servers. Further analysis, I have a set of different servers that I need to ssh simultaneously, those are the primary servers. Once I login to the primary servers then as a second step I want to ssh to the secondary servers.
localhost --> Primary 1st --> Secondary 1st localhost --> Primary 2nd --> Secondary 2nd localhost --> Primary 3rd --> Secondary 3rd ... ... ... localhost --> Primary nth --> Secondary nth
So my question, is that possible to be done with Perl?
Update 2: I have found a possible solution, ssh tunnel via multiple hops but I was wondering if it can be done by a module or possibly to be combined with Net::OpenSSH::Parallel module.
It is mandatory and important to me to execute the commands simultaneously at all servers. this is the reason that I am using the Net::OpenSSH::Parallel module.
Once more thank you for your time and effort to assist me.
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |