XAS::Lib::SSH::Client::Subsystem - A class to interact with the SSH Subsystem facility
use XAS::Lib::SSH::Client::Subsystem; my $client = XAS::Lib::SSH::Client::Subsystem->new( -host => 'auburn-xen-01', -username => 'root', -password => 'secret', ); $client->connect(); $client->run('echo'); my $output = $client->call('this is a test', sub { my $output = shift; ... }); $client->disconnect();
The module uses a SSH subsystem to make RPC calls. Which means it sends formated packets to the remote host and parses the resulting output. This module inherits from XAS::Lib::SSH::Client.
This method will set up the environment.
This method will invoke a subsystem on the remote host. Wither the remote host supports subsystems is dependent on the SSH Server that is running.
The subsystem to invoke.
This method sends a buffer to the remote host and parses the output.
The assumption with this method is that some sort of parsable data stream will be returned. After the data has been parsed the results are returned to the caller.
The buffer to send.
A coderef to the parser that will parse the returned data. The parser will accept one parameter which is a reference to that data.
Kevin L. Esteb, <kevin@kesteb.us>
Copyright (c) 2012-2015 Kevin L. Esteb
This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.
To install XAS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm XAS
CPAN shell
perl -MCPAN -e shell install XAS
For more information on module installation, please visit the detailed CPAN module installation guide.