Net::SSH::Any - Use any SSH module
use Net::SSH::Any; my $ssh = Net::SSH::Any->new($host, user => $user, password => $passwd); my @out = $ssh->capture(cat => "/etc/passwd"); my ($out, $err) = $ssh->capture2("ls -l /"); $ssh->system("foo"); my $sftp = $ssh->sftp; # returns Net::SFTP::Foreign object $sftp->put($local_path, $remote_path);
******************************************************************* *** *** *** NOTE: This is a very early release that may contain lots of *** *** bugs. The API is not stable and may change between releases *** *** *** *******************************************************************
Currently, there are several SSH client modules available from CPAN, but no one can be used on all the situations.
Net::SSH::Any is an adapter module offering an unified API with a plugin architecture that allows to use the other modules as backends.
It will work in the same way across most operating systems and installations as far as any of the supported backend modules is also installed.
The currently supported backend modules are Net::OpenSSH and Net::SSH2 and I plan to write a backend module on top of the ssh binary and maybe another one for Net::SSH::Perl.
The API is mostly a subset of the one from Net::OpenSSH, though there are some minor deviations in some methods.
Net::OpenSSH, Net::SSH2, Net::SSH::Perl.
Net::SFTP::Foreign
To report bugs send an email to the address that appear below or use the CPAN bug tracking system at http://rt.cpan.org.
Post questions related to how to use the module in Perlmonks http://perlmoks.org/, you will probably get faster responses than if you address me directly and I visit Perlmonks quite often, so I will see your question anyway.
The source code of this module is hosted at GitHub: http://github.com/salva/p5-Net-SSH-Any.
Commercial support, professional services and custom software development around this module are available through my current company. Drop me an email with a rough description of your requirements and we will get back to you ASAP.
If you like this module and you're feeling generous, take a look at my Amazon Wish List: http://amzn.com/w/1WU1P6IR5QZ42.
Also consider contributing to the OpenSSH project this module builds upon: http://www.openssh.org/donations.html.
Copyright (C) 2011-2012 by Salvador Fandiño, <sfandino@yahoo.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.4 or, at your option, any later version of Perl 5 you may have available.
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'Fandiño,'. Assuming UTF-8
To install Net::SSH::Any, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::SSH::Any
CPAN shell
perl -MCPAN -e shell install Net::SSH::Any
For more information on module installation, please visit the detailed CPAN module installation guide.