Aug 23, 2012, 7:21 AM
First thing you should be aware of is that there are some very good open source tools that do what you need and a lot more.
Re: [parvees] extended login using perl script
Please review these 2 tools.
Going back to your script, I think one aspect of your requirements was missed in the proposed solution. You're looking at wanting to cascade the ssh calls. Meaning that all ssh connections to the @servers need to originate from the $host server that you ssh'd into (not from where the script is running) and those "child ssh sessions" need to execute the subsequent commands.
I'm sure it can be done, but I don't see an easy way to do it. The better solution would be to use the tools that I mentioned above rather than what you're currently attempting.
(This post was edited by FishMonger on Aug 23, 2012, 7:22 AM)