XAS::Lib::SSH::Server - A SSH Subsystem based server
use XAS::Lib::SSH::Server; my $server = XAS::Lib::SSH::Server->new( -filter => POE::Filter::Line->new(), -eol => "\015\012", ); $server->run();
The module provides a POE based framework for a SSH subsystem. A SSH subsystem reads from stdin, writes to stdout or stderr. This modules emulates XAS::Lib::Net::Server to provide a consistent interface.
This initializes the module and starts listening for requests. The following parametrs are used:
The name of the POE session.
An optional filter to use, defaults to POE::Filter::Line
An optional EOL, defaults to "\015\012";
This method will process the input from the client. It takes the following parameters:
The input received from the socket.
A hash variable to maintain context. This will be initialized with a "wheel" field. Others fields may be added as needed.
This method will process the output from the client. It takes the following parameters:
The output to be sent to the socket.
A hash variable to maintain context. This uses the "wheel" field to direct output to the correct socket. Others fields may have been added as needed.
This method will process the error output from the client. It takes the following parameters:
This method is called after the client has connected. This is for additional post connection processing as needed. It takes the following parameters:
The id of the clients wheel.
This returns the peers port number.
This returns the peers host name.
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.