Compiling libssh for Android

As libssh does not provide official android support, compiling it for Android is a bit tricky. In this post, I’m providing my solution. Boringssl is used as the ssl lib.

The building script is developed for Linux but could be easily adapted for Windows, I think.

libssh android build scripts along with all the other stuff can be found here.
Compiled libssh and boringssl libs git repository can be found here.

The solution is based on a project called multipass ( and some posts from

The multipass project uses its own libssh, which is pretty much the same thing.

Using the libs in a cmake project looks like:


Make sure you link libssh-boringssl-compat.a lib to your project.

Leave a comment

Your email address will not be published. Required fields are marked *