in reply to Re^4: run a perl script on a unix machine from a win machine
in thread run a perl script on a unix machine from a win machine

Any suggestions?

Yes, is there any possibility you can run the script from a Linux box? Because doing this kind of sys admin tasks from Windows is an agony.

Well, in any case, post your script source code.

Can you install software on the Linux gateway or just allowed to run ssh in order to connect to the remote cisco?

Replies are listed 'Best First'.
Re^6: run a perl script on a unix machine from a win machine
by Anonymous Monk on Jan 28, 2012 at 13:10 UTC

    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";
      Try requesting allocation of a pty:
      $chan->pty(1); $chan->shell(); ...

        Yes, I was able to SSH to the jumpbox and issue "ssh -l" command to reach all the remote cisco devices.. Thanks alot. I am happy that Pty worked"