Net::SSH::Perl::ProxiedIPC - Make long distance SSH commands
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' }
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!
Create a new proxied object by passing the object you create with Net::SSH::Perl.
Net::SSH::Perl
This is just a wrapper around _open_perlssh, an internal function you shouldn't have to worry about.
_open_perlssh
Jennie Rose Evers-Corvina <seven@nanabox.net>, Matthew S Trout
<seven@nanabox.net>
You can use this package under the Artistic License 2.0
To install Net::SSH::Perl::ProxiedIPC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::SSH::Perl::ProxiedIPC
CPAN shell
perl -MCPAN -e shell install Net::SSH::Perl::ProxiedIPC
For more information on module installation, please visit the detailed CPAN module installation guide.