In partnership with

You built the audience. Can you reach them?

You can have thousands of people following your work and still need an algorithm’s permission to reach them. Creators know the drill: you post, you pray, you check the numbers, you try again tomorrow.

A newsletter changes that relationship. On beehiiv, you can build a subscriber list you own, reach readers directly, and turn their attention into a sustainable business with subscriptions, sponsors, a global ad network, and more.

Every time you log in to a Linux server over SSH, it prints a line most people scroll past:

Last login: Mon Nov  2 14:51:37 2026 from <an address>

So far in this series we've asked who is knocking (#011), what SSH should accept (#012), what's listening (#013), and what's running old code (#014). This issue asks the one that matters most after all of those: who actually got in?

On my test server, the answer was boring. That's the good outcome, and here's how I know. I'll also be clear about what these logs can't tell you, because that part matters as much as the commands.

Start with the line you scroll past

That line says the last time this account logged in, and from where. I read it on purpose and asked: was that me?

It was. Then I checked it against a second source, which is the habit I want you to build.

Who's on right now

who
testuser pts/0        2026-11-09 18:48 (<my address>)

One account, one terminal (pts/0), logged in at 18:48. That was my own session.

The history

last -n 15 -F
last reboot -n 5

last reads a file called wtmp and lists past logins: who, which terminal, from where, when they logged in and out, and for how long. -F prints full dates. My list went back to Oct 4, which is when that file begins, so the history isn't limited to this week.

Two things stood out in mine:

  • The root logins on Oct 11. Three short root sessions that afternoon are the ones from #012, when I was testing and root could still log in. They're still in the record. A log doesn't forget just because you fixed the problem.

  • The reboots. last reboot showed the server booting on Oct 4 with kernel 6.8.0-134, running until Nov 1, then booting on kernel 6.8.0-147. That's the restart from #014, recorded.

Which accounts could log in at all

lastlog | grep -v "Never logged in"
getent passwd | awk -F: '$7 !~ /(nologin|false)$/ {print $1, $7}'
getent group sudo

lastlog shows the last login for each account and, with that grep, hides the ones that never logged in. Only root and testuser appeared. The second command lists accounts that have a real login shell: root, testuser, and sync, which is a standard Ubuntu system account. The third shows who is in the sudo group: just testuser.

If you see an account you don't recognize, look it up before assuming anything. But "I know every line of this list" is a good thing to be able to say.

What the SSH log says

sudo journalctl -u ssh --since "7 days ago" --no-pager | grep -E "Accepted|ROOT LOGIN REFUSED" | tail -n 15

Then the counting trick from #011, to see logins by method and user:

sudo journalctl -u ssh --since "7 days ago" --no-pager | grep Accepted | awk '{print $7, $9}' | sort | uniq -c | sort -rn

Mine printed one line: 1 publickey testuser. One accepted login in seven days, by the right account, using a key.

That's fewer than last showed, because last goes back to Oct 4 and the journal search only goes back seven days. Different logs have different memories. When you check, know how far back each one reaches.

Each accepted line also includes the fingerprint of the key that was used. I compared the fingerprints in the journal with the keys in authorized_keys using ssh-keygen -lf, and they matched. I'm not showing them, but here are the commands:

ssh-keygen -lf ~/.ssh/authorized_keys
sudo journalctl -u ssh --since "7 days ago" --no-pager | grep Accepted | grep -o 'SHA256:[^ ]*' | sort | uniq -c

One thing I noticed while checking: root can't log in over SSH on my server, but root's authorized_keys file still contains a key. That isn't a hole by itself, since PermitRootLogin no blocks it. But it's a leftover worth knowing about.

The sudo trail

sudo journalctl _COMM=sudo --since "7 days ago" --no-pager | grep COMMAND | tail -n 15

Each line shows who ran sudo, from which terminal and folder, which user it ran as, and the exact command. Mine were all me, running the checks for this lab. The commands I used to look at the log show up in the log, which is a small reminder of how complete it is.

Count the most common ones:

sudo journalctl _COMM=sudo --since "7 days ago" --no-pager | grep -o 'COMMAND=.*' | sort | uniq -c | sort -rn | head

And look for typos:

sudo journalctl _COMM=sudo --no-pager | grep -i "incorrect password" | tail -n 5

That found one, from Oct 12: me mistyping my password while running the 48-hour log check from #012. Even a typo leaves a trail.

Failed logins don't show up in last

I wanted to see what a failed login looks like, so I logged in normally, then tried one I knew would fail, from my own PC to my own server:

ssh -o PubkeyAuthentication=no testuser@YOUR_SERVER_IP

Then I checked both places:

last -n 3 -F
sudo journalctl -u ssh --since "10 minutes ago" --no-pager | tail -n 15

last showed my good login (it lasted four seconds). It showed nothing for the failed attempts. The journal had the Accepted publickey line, and then lines like this for the failures:

Connection reset by authenticating user testuser <address> port 50410 [preauth]

So to see failed logins, look in the journal. I also checked the dedicated failed-login file:

ls -l /var/log/btmp
sudo lastb -n 10

The file was 0 bytes and lastb printed nothing. I won't guess why. On my server, that's not where the failures are.

What these logs can't tell you

Be honest about the limits:

  • They show what the system recorded, not who was at the keyboard. An address could be a VPN, a shared network, or someone using your stolen key.

  • An attacker who gets control of an account looks like that account. A normal-looking login isn't proof of a normal person.

  • Logs on the same machine can be changed by someone with enough access. On a server that matters, send logs somewhere else.

  • A boring result proves less than it feels like. It means nothing unfamiliar showed up in what I checked.

If you find something you don't recognize

Don't delete anything. Write down the time, the address, and the account. Use last, the journal, and the sudo trail to see what it did. Check authorized_keys for keys you don't recognize. On a disposable server, rebuilding is often the simplest answer. On a real one, bring in whoever is responsible for it.

Try This: audit who has been on your server

Use a disposable Ubuntu server. It took me about 35 minutes. Give yourself an hour the first time.

  1. Read the Last login line, then check it against last.

  2. Run who.

  3. Run last -n 15 -F and last reboot -n 5. Can you account for every line?

  4. List accounts with a login shell and the members of the sudo group.

  5. Count accepted logins by method and user in the journal.

  6. Compare the key fingerprints in the journal with authorized_keys.

  7. Read the sudo trail and count the most common commands.

  8. Make one good login and one that fails, then find both in the logs.

  9. Write down what surprised you, and what you couldn't tell from the logs.

Worth Knowing

Both explain where the data comes from and what the options do.

Remote roles worth a look this week

Why spend your evenings reading logs and login history? Because employers keep asking for people who can troubleshoot, work with logs and identity, and explain what they found. Here are three current remote roles, from early career to mid level.

Listings can close quickly. I checked each one on the employer's own page while preparing this issue, but always check the employer's page before applying.

Customer Support Engineer, LILT

Remote (Pacific or Mountain time zone) | $64.4K-$90.2K + equity | 1-3 years

First-line support for a translation platform. You'd evaluate incoming requests, resolve what you can, route the rest, reproduce and document bugs for engineering, and join customer calls. The posting mentions SQL and Google Cloud, and a bachelor's degree is preferred but not required. They're hiring in the Pacific or Mountain time zones, such as Seattle, Portland, Denver, San Diego, or Salt Lake City.

Cloud Support Administrator, Atmosera

Remote U.S. | $70K-$90K | 3+ years of Azure support

A cloud-operations role covering Azure administration, Windows and Linux servers, networking and firewalls, hypervisors, and automation with PowerShell and Bicep. They want 3+ years of Azure support experience, and an AZ-104 certification within 90 days of starting if you don't have one. Know before you apply: it includes an on-call rotation, and you must be able to pass a U.S. Public Trust background check.

IT Systems Administrator, Blackpoint Cyber

Remote U.S. | $99.1K-$123.9K + equity | about 3-5 years

A mid-level IT systems role: working the Jira Service Management queue, Tier 1 and Tier 2 issues across macOS and Windows, Microsoft Entra ID, SSO and MFA, Intune, Jamf, and Datto RMM, plus compliance reporting and scripting in PowerShell, Bash, or Python. They ask for about 3 to 5 years in IT support, systems administration, or IT operations, including Tier 2 experience.

What these have in common

The job titles change, but the same fundamentals keep showing up: troubleshooting, logs, identity and access, documentation, and being able to explain what you found. None of that guarantees a job. Nothing does. But these skills keep showing up because employers keep needing them, and every one of them is something you can practice on a cheap server or a free VM this weekend.

If you're building the fundamentals

I'm also building SecureByDefault Learning Paths, a free GitHub repo that organizes Linux, networking, troubleshooting, cloud, hands-on projects, and career paths into a learning order. It's a work in progress and I add to it regularly.

Your next step

New to Linux?

The free Linux Starter Kit includes the commands, a practice plan, log examples, and a beginner server checklist.

If someone forwarded you this issue, you can subscribe here: https://newsletter.securebydefault.io/

Looking for flexible side work?

Disclosure: the two links in this section are my referral links. If you sign up through one and meet that program's requirements, I may receive a referral reward. I'm trying them in this issue to learn whether you want side-work options in this newsletter, and I'll be watching how many of you click.

This is a different category from the roles above. These are contract platforms, not jobs. Project availability and hours vary, and neither one guarantees you any work or income.

Handshake AI

Handshake describes its AI Fellowship as flexible, project-based contract work, not a full-time job, with no guaranteed hours. Task availability depends on the needs of its partner labs. Eligibility depends on your location and work authorization, so read their requirements before you sign up.

Mercor

Mercor lists contract projects for independent contractors. Its own postings say a project's length can change and that projects can be shortened or ended early. Pay and requirements vary by project.

Both links above are referral links, as described at the top of this section.

Next issue

Five issues in, we've covered who's knocking, what SSH accepts, what's listening, what's out of date, and who has been on the server. Next time, I'll pull it together into one checklist you can run on a new server in about an hour.

Talk soon,

Ron
SecureByDefault

Reply

Avatar

or to participate

Recommended for you

View all
caret-right