How to use hydra

Hackbydoing Academy tool guide · Password attacks & hashing · free, no login

What hydra is, in plain words

Hydra tries logging in to a service over and over with different usernames and passwords until one combination works — a password-guessing machine for your own lab targets.

A working hydra command

hydra -l admin -P passwords.txt ssh://192.168.99.20

This tries every password in passwords.txt against the admin account on the SSH login of the machine at 192.168.99.20.

Every piece of the command, explained

-LCapital L: the next piece is the name of a file listing usernames to try, one per line.
-PCapital P: the next piece is the name of a file listing passwords to try, one per line.
-lLowercase l: the next piece is the single username to try, instead of a whole file of them.
-pLowercase p: the next piece is the single password to try, instead of a whole file of them — paired with -L, this is password spraying: one password against many accounts.
-tThe next number is how many login attempts to run at the same time (tasks). More is faster but noisier and can lock accounts or overwhelm a weak service.
target and serviceThe last piece names what to attack, written like ssh://192.168.99.20 — the login type (protocol) first, then the machine's address.

Use it the legal way

Only run hydra on systems you own or have explicit, written permission to test — at work that means a signed engagement, at home that means your own lab. Inside Hackbydoing Academy you practice on simulated networks and lab machines built for exactly this, where breaking things is the lesson and no one else's systems are involved. Learning how a tool works also teaches you what it looks like from the defender's chair: the logs it leaves, the traffic it makes, and the settings that shut it down.

✦ Practice hydra hands-on in a guided lab

Reading about hydra is step one. In the Academy you run it yourself, step by step, in guided labs on simulated networks — 185 rooms covering attack and defense, from your first scan to full operations, with a defender's debrief at the end of every room. Founding membership is $9.99/mo for the first 500 members.

Join Hackbydoing Academy →

Related tool guides

Free from the Hackbydoing Academy — learn cybersecurity by doing: real tools, guided labs, attack and defense, on simulated networks. More free material: Tool Guides index · Free Downloads Library · Hackbydoing Academy · Print this page (Ctrl/Cmd+P) for a clean paper copy.