Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Runing Remote Command

by salva (Monsignor)
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 browsing the Monastery: (9)
As of 2014-10-01 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (29 votes), past polls