Please note: The main thc-Hydra website as malicious. Do not visit there on your main system. All of the links on this page go straight to the source at github.
First you need to install git and tools to build the code. We will use this to get the source for thc-Hydra, and to update it from time to time.
sudo apt-get install git build-essential
Next, we need to get the source for thc-Hydra from github:
git clone https://github.com/vanhauser-thc/thc-hydra.git
sudo chown -R [your username] thc-hydra
sudo chmod -R 755 thc-hydra
Now you should have the source code, but most likely if you install now it will be missing a lot of the libraries it needs. Install some of the most common libraries from the packages below:
sudo apt-get install zlib1g-dev libssl-dev libidn11-dev libcurses-ocaml-dev libpcre3-dev libpq-dev libsvn-dev libafpclient-dev libssh-dev
Now try to build hydra
Check the output and see if you can find any missing libraries.
sudo make install
Here "make -jX" where X is the number of processors your system has.
Now hydra should be installed. Type which hydra to see the install location. You can test ssh with a password list with the following command:
/usr/local/bin/hydra -l root -P PW.list -f -s 22 -t 4 -e ns 127.0.0.1 ssh