in reply to Re: Running remote commands (Net::SSH2)
in thread Running remote commands (Net::SSH2)

use Net::OpenSSH; my $ssh = Net::OpenSSH->new('repository'); $ssh->error and die "Can't ssh to $host: " . $ssh->error;
when running this, I get

ssh: illegal option -- M

with $ssh->error revealing..."unable to establish master SSH connection: ssh master exited unexpectedly"

Replies are listed 'Best First'.
Re^3: Running remote commands (Net::SSH2)
by salva (Canon) on Dec 23, 2009 at 13:58 UTC
    You have to ensure you have recent version of OpenSSH installed on the machine.

    What do you get when you run...?

    $ ssh -V
      OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090701f
        3.6.1p2 is way too old.

        Net::OpenSSH requires at least 4.1 and 5.x is recommended