libssh2 and libssh both implement SSH and provide a library API for apps. Both support SSH, SFTP, auth, channels etc. Both are 25K-30K lines of code.
Here's an attempt to put some light on the differences between them.
(It could be noted that libssh's primary development is nowadays done in their 0.5 branch and once that becomes their release branch we'll update this comparison)
The same data, in a table:
| item | libssh2 | libssh |
|---|---|---|
| Licence | BSD | LGPL |
| Non-blocking API | everything | parts |
| Server-side supported | no | yes |
| Stable API | yes | no |
| C compatibility | C89 | C99 |
| strict namespace | yes | no |
| man pages for all functions | yes | no |
| SSHv1 support | no | yes |
| Build concept | Autotools | CMake |