After I managed to compile and link libssh2, the easiest way to get started using libssh2 was to look at the examples. Written in plain C, the examples cover some of the most common use cases and compensate for the fact that the rest of the documentation is rather sparse. Managing threads One key topic that unfortunately neither the examples nor the documentation address is thread-safety. The documentation for libssh2_init function states that the function … uses a global state, and is not ...