SSHGuard is available as a package from several package repositories, usually under the name sshguard.
Obtain a source distribution from http://www.sshguard.net/. Extract the archive and run:
./configure make && make install
Alternatively, if you are building from the source repository:
git clone https://bitbucket.org/sshguard/sshguard.git cd sshguard/ autoreconf -i ./configure make && make install
If you are building from the source repository, you also need:
apt install autoconf automake byacc flex gcc python-docutils
dnf install autoconf automake byacc flex gcc python-docutils
pkg install autotools byacc clang flex py27-docutils