Member-only story

7 Linux Security Mistakes I Made (So You Don’t Have To)

--

Share

Intro:

When I started managing Linux servers, I focused on speed over safety. I just wanted things to work — and I didn’t always stop to think about security. Over time (and a few close calls), I learned the hard way that small oversights can become big vulnerabilities. Here are 7 Linux security mistakes I made so you don’t have to.

1. Leaving SSH on the Default Port (22)

I left SSH open on port 22, thinking “everyone uses it.” Turns out, bots scan that port constantly.

✅ Fix:

sudo nano /etc/ssh/sshd_config  # Change:Port 22 → Port 2210

Then restart:

sudo systemctl restart sshd

2. Allowing Root Login via SSH

I thought root login would save time. Instead, I was handing attackers a shortcut.

✅ Fix:

# In /etc/ssh/sshd_config:PermitRootLogin no

3. Ignoring Open Ports

I never checked what was listening — bad idea. One service left exposed nearly cost me.

✅ Fix (Ubuntu & Red Hat):

ss -tuln

4. Forgetting to Set…


👉 Read Full Blog on Medium Here