NAME
Net::SSH::Perl::ProxiedIPC - Make long distance SSH commands
SYNOPSIS
my $ssh = Net::SSH::Perl->new( ... );
my $pipc = Net::SSH::Perl::ProxiedIPC->new( ssh => $ssh );
{
my ($cmd, $perlssh) = $pipc->open;
$perlssh->eval( "use POSIX qw(uname)" );
my @uname = $perlssh->eval( "uname()" ); # Returns the host of $ssh
}
{
# Go from this host through host1 to host2
my ($cmd, $perlssh) = $pipc->open( 'user1@host1', 'user2@host2' );
$perlssh->eval( "use POSIX qw(uname)" );
my @uname = $perlssh->eval( "uname()" ); # Returns 'host2'
}
DESCRIPTION
This is a utility module that wraps around two SSH modules; Net::SSH::Perl and IPC::PerlSSH. By leveraging PerlSSH against the authenticated long-distance requests, you create a means to access data that would otherwise be secured and unaccessible from the outside world, such as if you were on site with a client. And it lets you call Perl from the remote machine! Yay!
METHODS
- new
-
Create a new proxied object by passing the object you create with
Net::SSH::Perl
. - open
-
This is just a wrapper around
_open_perlssh
, an internal function you shouldn't have to worry about.
SEE ALSO
AUTHOR
Jennie Rose Evers-Corvina <seven@nanabox.net>
, Matthew S Trout
COPYRIGHT
LICENSE
You can use this package under the Artistic License 2.0