libssh is a Free Software / Open Source project. The libssh library is distributed under LGPL license. The libssh project has nothing to do with "libssh2", which is a completly different and independant project.
libssh can run on top of either libgcrypt (http://directory.fsf.org/project/libgcrypt/) or libcrypto (http://www.openssl.org/docs/crypto/crypto.html), two general-purpose cryptographic libraries.
This tutorial concentrates for its main part on the "client" side of libssh. To learn how to accept incoming SSH connexions (how to write a SSH server), you'll have to jump to the end of this document.
This tutorial describes libssh version 0.5.0. This version is a little different from the 0.4.X series. However, the examples should work with little changes on versions like 0.4.2 and later.
Table of contents:
Chapter 1: A typical SSH session
Chapter 2: A deeper insight on authentication
Chapter 3: Opening a remote shell
Chapter 4: Passing a remote command
Chapter 7: Forwarding connections (tunnel)
Chapter 8: Threads with libssh