Written 28 Aug 2026. This is a how-to, not a product card.
See if anyone guessed the password
Before you buy a camera or extra login software, peek at failed logins with lastb.
You already peeked at who got in with see who logged into the computer recently, and who is on right now with see who is on the computer right now. Those lists are successful logins. This note is the other diary: password guesses that did not work. You are reading a short list the computer already keeps. You are not buying a camera, a SIEM, or extra login software for this look.
Skip until SSH works
If you have never logged in from the couch, that is SSH from the couch. Prefer a password you chose first: change the login password. This note assumes you can log in from the couch. It is a quiet look, not day-one homework.
What this is
A peek, not a shopping trip. last is who got in. lastb is who did not: mistyped passwords, and guesses that failed. Your own typos while learning SSH will show up. That is normal. Failed guesses that keep coming from outside the house are a different problem, and the fix is almost never a new gadget.
Ask who guessed and failed
SSH in from the couch, then ask. The computer will ask for your password one more time, because this diary stays private:
sudo lastb -n 10
An empty print, or a line that says the diary is empty, is fine. A few lines with your username from a house address are usually you, mistyping. Don't buy anything because the table printed once. If it says permission denied, you skipped sudo.
Optional: show the source address
If the from column is truncated and you want the address:
sudo lastb -n 5 -a
Keep this note on the short list. You don't need a fancy log viewer for ten lines. If lastb is missing, the same diary is:
sudo last -f /var/log/btmp -n 10
If the list looks like the internet
A pile of names you did not type (root, admin, pi, ubuntu) from addresses that are not the house usually means SSH is reachable from the street. Stop. Close port 22 on the router. SSH stays on the house network: keep the computer on the house network. Change the password: change the login password. Don't buy a camera for a list of guesses. Don't install extra login software just because lastb printed. Guess-slowing later, after the firewall is on, is slow down password guesses on SSH.
What next
Leave it. Once in a while is enough for this peek after the login habit is boring. Successful history is see who logged into the computer recently. Who is on right now is see who is on the computer right now. The firewall path is turn on a simple firewall without locking yourself out. Guess-slowing later is slow down password guesses on SSH. The first rule stays start with what you already have.
Skip
- Skip if SSH from the couch is not working yet. That is SSH from the couch.
- Skip a camera, a SIEM, or extra login software for this look.
- Skip opening port 22 on the router. SSH stays on the house network.
- Skip treating your own mistyped password as an attack.
- Skip a NAS for this look.
Sources
Debian: lastb. Ubuntu: lastb. Official pages only. Successful logins are see who logged into the computer recently. Who is on right now is see who is on the computer right now. For the login, see SSH from the couch. For a password you chose, see change the login password. For failed guesses later, see slow down password guesses on SSH. For the house-network boundary, see keep the computer on the house network.