Read the scenario first
Each lab starts with a situation, the way a ticket or an exam question does. Work out what is being asked before you type anything.
Free tool · No sign-up needed
Work through an SSH log with grep, sort and uniq: count the failed logins, find the attacker, see what they got into, then contain it.
Last updated
Linux command line · Intermediate · About 15 minutes
The monitoring system raised an alert overnight: a burst of failed SSH logins on web01. You’re the analyst on shift. The log is /var/log/auth.log.
Find out how big the attack was, where it came from and whether it worked. Then contain it: lock the account that was used and block the attacker’s address.
A practice Ubuntu terminal that runs in your browser. It understands real commands, and nothing you type can break anything.
Count the failed password attempts in /var/log/auth.log. (not done yet)
Find the address that made the most failed attempts. (not done yet)
Check whether that address ever signed in successfully, and with which account. (not done yet)
Lock the compromised account. (not done yet)
Block the attacker’s address and allow SSH for everyone else, with the block first in the list. Then turn the firewall on. (not done yet)
Take it further in OpenpassAI
OpenpassAI’s Hands-on Labs put you in a Linux or Windows terminal for the certification you’re studying, in guided, hint-only and timed modes.
About this lab
One way to complete the lab, with the reason for each step. Try it yourself first.
grep -c "Failed password" /var/log/auth.loggrep "Failed password" /var/log/auth.log | awk '{print $(NF-3)}' | sort | uniq -c | sort -nrgrep "Accepted" /var/log/auth.log | grep 203.0.113.45sudo passwd -l backupsudo ufw deny from 203.0.113.45sudo ufw allow 22/tcpsudo ufw enableGuide
Each lab starts with a situation, the way a ticket or an exam question does. Work out what is being asked before you type anything.
Typing a command, getting it wrong and fixing it is what makes it stick. Use the hints when you’re stuck, not before.
Every lab has a worked solution with the reason for each step. Read it even when you finished: there is often a shorter way.
Reset the lab a day later and do it without hints. If you can, you know it. If you can’t, you’ve found what to study.
14 free labs in your browser: Linux and Windows command line, firewall rules and SOHO router setup, checked as you go.
Open the toolFree performance-based questions for 19 CompTIA exams: firewall rules, network diagrams, command-line tasks and drag-and-drop.
Open the toolFree practice tests for 261 popular certification exams, with explanations and a score by exam domain.
Open the toolFAQs
Find quick answers or contact our support team.
No. It’s a practice terminal that runs in your browser. It understands the real commands the lab needs, and many more, and it answers the way an Ubuntu server would. It isn’t a full operating system: nothing is installed, and nothing you type can break anything.
The everyday ones: ls, cd, cat, grep, awk, sed, sort, uniq, find, chmod, chown, useradd, usermod, passwd, systemctl, journalctl, ip, ping, dig, ss and ufw, with pipes, redirects and sudo. Type help in the terminal for the full list. Text editors and package installs aren’t included.
It practices skills from CompTIA CySA+ (Security Operations), CompTIA Security+ (Security Operations) and CompTIA Linux+ (Troubleshooting).
No. The labs run in your browser and nothing is saved. Sign up only if you want OpenpassAI’s full labs and progress tracking.
OpenpassAI
Hi 👋 I’m OpenpassAI. Ready to prepare for your exam the smarter way?
Ready to explore OpenpassAI? I can show you how the platform helps you prepare, practice, and pass.