Skip to content

nfetisov/net-ssh2

 
 

Repository files navigation

Net::SSH2 - Secure Shell protocol interface
===========================================

Net::SSH2 is a perl interface to the libssh2 (http://www.libssh2.org)
library.  It supports the SSH2 protocol (there is no support for SSH1)
with all of the key exchanges, ciphers, and compression of libssh2.
At present, libssh2 requires OpenSSL (http://www.openssl.org) and can
optionally use zlib for compression (http://www.zlib.net).


MODULE DEPENDENCIES

To install modules that Net::SSH2 depends upon type the following:

   cpanm Module::Install Module::Install::CheckLib IO::Scalar Term::ReadKey


DEPENDENCIES

This module also requires these libraries:

   libssh2 (http://www.libssh2.org; recommended to use version 1.7.0 or later)
   OpenSSL (http://www.openssl.org)
   zlib (optional; http://www.zlib.net)

To install dependencies:

Debian:   sudo aptitude install libssh2-1-dev libssl-dev
OpenSUSE: sudo zypper in libssh2-1 libssh2-devel
OS X homebrew: brew install libssh2


INSTALLATION

To install Net::SSH2 type the following:

   perl Makefile.PL
   make
   make test
   make install


BUGS/FEATURE REQUESTS

Please report bugs and request features on the CPAN bug tracking site,
rt.cpan.org.  If you are able and willing to provide a fix, attach a patch
and please provide your name to be credited in the changelog and an email
address for verification/discussion.

The ssh-sftp-perl-users mailing list
(http://lists.sourceforge.net/lists/listinfo/ssh-sftp-perl-users),
while set up for Net::SSH::Perl, is also an appropriate place to post
questions or comments about Net::SSH2.


TESTING

You can run more extensive tests with the following command:

   perl -Mblib t/Net-SSH2.t

This will prompt you for a hostname and subsequently a username to
test connecting with. You can use localhost, a remote hostname or an
IPv4 or IPv6 address.

There are some tests (SCP) that require IO::Scalar installed to run.


HACKING

The module is kept in a GitHub (http://github.com/rkitover/net-ssh2/)
repository, git://github.com/rkitover/net-ssh2.git

If you are interested in making a change/fix, please discuss it first.  If you
are unfamiliar with XS (perl C bindings), you should review the perlxs,
perlapi, and perlcall perldoc pages to learn more.  The secure shell protocol
is managed by the IETF secsh working group at
http://www.ietf.org/html.charters/secsh-charter.html.  The source code of
libSSH2 will also be instructive.


TODO

More examples for the example/ directory would be nice.

Add get/put (file) methods to Net::SSH2::SFTP (as a shortcut, rather than 
requiring open/read/write/close).

COPYRIGHT AND LICENCE

Copyright (C) 2005-2008 by David B. Robins.

Copyright (C) 2010-2016 by Rafael Kitover ([email protected]).

Copyright (C) 2011-2016 by Salvador Fandino ([email protected]).

All rights reserved.

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.0 or,
at your option, any later version of Perl 5 you may have available.

About

Net::SSH2 perl module using libssh2

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 48.8%
  • Perl 30.4%
  • XS 20.8%