SSH for Android

I've searched the internet high and low for an SSH library that works on Android. There is none. There are a couple of attempts, but they use Python and some other shit I don't have. So I decided to build my own, from libssh2.

Here is the result. This is a script which will download, compile and install libssh2, along with mbedTLS. The latter is a cryptographic library.

There are three mandatory environment variables you must set before running the script.

Here is how I used it last time, for example:
ABUCC=/home/dodo/PRG/ANDROID.12/bin/arm-linux-androideabi-gcc \
ABUAR=/home/dodo/PRG/ANDROID.12/bin/arm-linux-androideabi-ar \
ABUDEST=/home/dodo/PRG/ANDROID.12/sysroot/usr \
You can also set the variable ABUCFLAGS. This is optional and is provided so that you can set additional compiler flags, it doesn't replace the flags in the script.

The resulting library file libandroidssh.a can be used to link ssh2 applications. You will also need libz.a.

The license file is generated to $ABUDEST/LICENSE-androidssh.txt. This contains the licenses for the two components. You should probably display them to your users when they ask about such things.

You will need bash, md5sum, wget and gawk in order to run this script. It will create a directory called android-ssh-build in the working directory. This can be removed after you're done. I just leave it there for troubleshooting or playing around with examples.