Installing Android SDK, NDK and toolset
Search for the download page of Android command line tools. As of this writing, download page is https://developer.android.com/studio/ but this is highly likely to change in the future.
Navigate to the aforementioned download page and search for Command Line Tools link for the specific platform you are targeting. The most likely target platform is Linux.
After locating the link, ssh to your server, preferably as root. Create directory that would ultimately host Android binaries and use wget tool to download Command Line Tools, as per bellow:
mkdir /opt/android