Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 avoiding work at the Monastery: (17)
As of 2014-07-28 16:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (204 votes), past polls