I work remotely, have to VPN into a network, SSH to the jumpbox(gateway, then ssh to actual cisco devices, only basic user access on the linux box

Every week we have to capture bunch information from various sites' network devices, it is a manual intensive work which suits perlscript perfectly

$chan->shell(); print $chan "ssh -l username 10.1.1.1\n"; while($buf=<$chan>){ if($buf =~ /"password:"/) { print $chan "password\n"; # got password prompt} else { exit; # export debug info, not reachable etc } } # # Once SSH into cisco switches, process cisco commands here # The actually commands are input from a separate file, # this is just an example. # print $chan "show tech\n"; print $chan "show version\n";

In reply to Re^6: run a perl script on a unix machine from a win machine by Anonymous Monk
in thread run a perl script on a unix machine from a win machine by akrrs7

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.