SSH Password Credential Attacks
Validate credentials, spray in a controlled way, and only then brute force if it’s justified and permitted.
Single credential validation
Start with one known pair. If the target rejects it, you want a clean failure you can interpret, not noise from a spray run.
SSH 127.0.0.1 22 127.0.0.1 [*] SSH-2.0-OpenSSH_8.2p1 Debian-4 SSH 127.0.0.1 22 127.0.0.1 [+] user:password
Manual validation is still useful when interactive policies matter:
If keyboard-interactive or MFA gates are in play, tools may report “failure” while the manual client makes it obvious what’s happening.
Password spraying
Spraying is one password across many users. Keep it slow. SSH falls over under pressure long before you hit “lockout”.
NetExec spray:
SSH 127.0.0.1 22 127.0.0.1 [*] SSH-2.0-OpenSSH_8.2p1 Debian-4 SSH 127.0.0.1 22 127.0.0.1 [+] user:password
Hydra spray with low concurrency:
[22][ssh] host: $TARGET_IP login: alice password: Winter2025!
If you see connection errors, do not “fix it” by increasing threads. Lower concurrency and add breathing room.
Controlled brute force
Only do this when you have explicit approval and you’ve already measured lockout behavior.
Hydra brute force, stop on first hit:
Crowbar with a combo file:
creds.txt is typically user:password per line.
Nmap brute script is a workable “pipeline” option when you’re already running Nmap, but it’s not as controllable as Hydra for real credential work:
Root login attempts
Root testing belongs here when you have a candidate password and ROE allows it. Otherwise it’s just log noise.
SSH 127.0.0.1 22 127.0.0.1 [*] SSH-2.0-OpenSSH_8.2p1 Debian-4 SSH 127.0.0.1 22 127.0.0.1 [+] root:password
Manual root attempt:
If root accepts password auth and you land it, treat it as high impact. If root is key-only while users are password, pivot to key workflows instead of hammering passwords.
References
-
SSH credential validation and spraying workflows.
-
Controlled spraying and brute force with thread and wait tuning.
-
Combo-driven brute force utility supporting SSH.
-
Nmap NSE ssh-brutenmap.org/nsedoc/scripts/ssh-brute.html (opens in new tab)
SSH brute script with userdb and passdb support.
-
NetExec Password spraying (without bruteforce)www.netexec.wiki/ssh-protocol/password-spraying (opens in new tab)
-
NetExec Testing credentialswww.netexec.wiki/ssh-protocol/authentication (opens in new tab)
Was this helpful?
Your feedback helps improve this page.