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
    so what happens when you try those commands...?

      I don't remember exactly, but it says that it is unrecognizable command.

        when the doctor asks you what your symptoms are, is "i dont remember" an acceptable answer?