NAME

Data::Collector::Engine::OpenSSH - An OpenSSH engine for Data::Collector utilizing Net::OpenSSH

VERSION

version 0.15

SYNOPSIS

use Data::Collector;

my $collector = Data::Collector->new(
    engine      => 'OpenSSH', # the default
    engine_args => {
        user   => 'me',
        host   => 'soymilkyway',
        passwd => 'crow@MIDn1ght',
    },
);

ATTRIBUTES

host(Str)

Host to connect to. Required.

user(Str)

Username to connect with. Defaults to session user.

passwd(Str)

Password to be used in connection. As with the OpenSSH ssh program, if a password is ot provided, it will go over other methods (such as keys), so this is not required.

ssh(Object)

Contains the Net::OpenSSH object that is used.

SUBROUTINES/METHODS

connect

This method creates the Net::OpenSSH object and connects to the host.

run

This functions runs the given command on the host using ssh and returns the results.

pipe

Pipes your request to the command. Gets the command to run, returns the output of that command.

AUTHOR

Sawyer X <xsawyerx@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2012 by Sawyer X.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.