in reply to How to apply multiple parallel consecutive ssh sessions

What are "primary" and "secondary" servers?

Elaborate your problem description, please!

  • Comment on Re: How to apply multiple parallel consecutive ssh sessions

Replies are listed 'Best First'.
Re^2: How to apply multiple parallel consecutive ssh sessions
by thanos1983 (Parson) on Jan 07, 2015 at 00:02 UTC

    Hello salva,

    Thank you for your time and effort reading my question, I have updated the question and I have added a small graph to explain the steps of my process.

    Seeking for Perl wisdom...on the process of learning...not there...yet!
      You can use Net::OpenSSH::Gateway.

      It never went into CPAN because I was unhappy with its internal architecture and was planning a complete revamp, but unfortunately never got the time/guts to actually do it.

      In any case, it works reliably. Just install it and tell Net::OpenSSH(::Parallel) to use it with the gateway option:

      $pssh->add_host($secondary_server, gateway => { proxies => "ssh://$primary_server" }, ... );
      Or in case you want to pass additional options when constructing the underlaying Net::OpenSSH object used to connect to the primary server:
      $pssh->add_host($secondary_server, gateway => { proxies => { url => "ssh://$primary_serve +r", user => $primary_user, password => $primary_passwor +d, ... } }, ... );

        Hello salva,

        Perfect this is exactly what I was looking for as an alternative to the link that I provided on my update. Thank you for your time and effort.

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