Hi I have Perl script (with set of system command in `sys command`). I wanted to run this script in other list of server that I can provide at the run time of my local server. Also I can not use Expect/ Net::SSH module or any other CPAN module. My script is running perfectly fine in my local machine, but when I have place the block of code, it seems it do not have reference to the script and can perform any other line of code after doing ssh to the specific server. e.g. script name: servervalidation.pl my script should first take the server, and ssh to that server and then in that server login as su and then perform some set of command and get the information and send back to the local server from which I run he script. take argument: list_of_server File content :servera, serverb, serverc......

In reply to Execute Perl script on Remote server without any CPAN module by kotak86

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.