The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

SSH::Command - interface to execute multiple commands on host by SSH protocol without certificates ( only login + password )

SYNOPSIS

 use SSH::Command;

 my $result = ssh_execute(
    host     => '127.0.0.1',
    username => 'suxx',
    password => 'qwerty',
    commands =>
        [
            {
                cmd    => 'uname -a', # for check connection
                verify => qr/linux/i, # or  => 'linux-....' (check by 'eq')
            }
        ]
    );

 if ($result) {
    print "all ok!";
 } else {
    print "Command failed!";
 }

  Execute one command and get answer:

  my $command_answer_as_text = ssh_execute(
    host     => '127.0.0.1',
    username => 'suxx',
    password => 'qwerty',
    command  => 'uname',     # for check connection
  );