Hello again Sombrerero_loco

I noticed on the sample of your script that you are SSH to multiple nodes:

for my $vh(sort @hosts) {

This kind of processes will force sequential SSH sessions. I can not really test your code since you have provide us only a sample, so I can not replicate your problem.

Update: of course the author knows how to resolve the problem. Just take a look also on similar examples in case you find something useful.

But, in the past I had similar problems I tested any possible way of ssh, telnet modules that I could find. Take a look with working codes examples Best module to execute administrator commands on external operating systems (Linux).

Recently also another monk was asking for something similar (been able to SSH to multiple nodes). I created a working example for him with Net::OpenSSH::Parallel and the example is multiple machines disk space alert.

Similarly if you want to execute also SUDO commands, including example with working code Net::OpenSSH::Parallel with sudo commands.

Hope this helps, maybe to have another approach to your problem.

Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Re: Net::OpenSSH problem "controlpath is too long" by thanos1983
in thread Net::OpenSSH problem "controlpath is too long" by Sombrerero_loco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.