dorel has asked for the wisdom of the Perl Monks concerning the following question:
Hi there, Im trying to connect to ZyXEL VMG8324-B10A via ssh using perl script with module Net::OpenSSH. I'm using straight from ducumentation script like this:
my $ssh = Net::OpenSSH->new("$username:$password\@$ip", timeout => 30 +); $ssh->error and die "unable to connect to remote host: ". $ssh->error +; my @ls = $ssh->capture("ls"); $ssh->error and die "remote ls command failed: " . $ssh->error;
and that works, but all I get is commands from unix like systems "ls" "cat" etc. i want to run commands that work when i connect to the router by hand like "arp show". How to achieve that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Net::OpenSSH
by salva (Canon) on Oct 06, 2017 at 07:58 UTC | |
|
Re: Using Net::OpenSSH
by thanos1983 (Parson) on Oct 06, 2017 at 08:23 UTC | |
|
Re: Using Net::OpenSSH
by Anonymous Monk on Oct 05, 2017 at 20:24 UTC | |
by dorel (Initiate) on Oct 05, 2017 at 20:27 UTC | |
by Anonymous Monk on Oct 05, 2017 at 21:33 UTC | |
by afoken (Chancellor) on Oct 06, 2017 at 05:09 UTC | |
by Anonymous Monk on Oct 06, 2017 at 07:35 UTC |