Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Runing Remote Command

by salva (Abbot)
on Apr 11, 2013 at 08:31 UTC ( #1028090=note: print w/ replies, xml ) Need Help??


in reply to Runing Remote Command

Try Net::OpenSSH (more powerfull, doesn't work on Windows) or Net::SSH::Any:

use Net::SSH::Any; my $ssh = Net::SSH::Any->new('10.253.0.1', user => 'admin', password => $password); $ssh->error and die "unable to connect to remote machine: " . $ssh->er +ror; my ($out, $err) = $ssh->capture2(cli => '"enable"', '"run"', '"reload" +'); $ssh->error and die "remote command failed: " . $ssh->error; print $out, $err;


Comment on Re: Runing Remote Command
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1028090]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (16)
As of 2015-07-28 14:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (255 votes), past polls