Auditing Stale SSH Keys on Production Servers

Using ssh-keygen and fail2ban to reduce brute-force risk

Auditing Stale SSH Keys with ssh-keygen -l and Protecting with fail2ban

SSH keys that sit unused for months can become a silent backdoor if a private key ever gets compromised. On a production server the safest way to keep the key list lean is to audit it regularly and block any brute‑force attempts that surface while you’re cleaning up.

1. List all authorized keys with fingerprints

The authorized_keys file lives in each user’s ~/.ssh/. To see which keys are actually present, run:

[Read More]

Restoring One File from a Corrupted Borg Backup

Extracting a single config without the full archive

Recover a single file from a damaged Borg archive

When a Borg repository gets corrupted, the instinct is to dump the whole thing back. That’s usually overkill if you just need one config file. Borg actually gives you a fine‑grained extraction tool that can pull a single file even from a partially broken archive.

1. Verify the repository

borg check /srv/backups/myrepo

borg check will surface any integrity problems. If you see corruption, you can try to fix it:

[Read More]

The Quick Fix to Stop a Flatpak App From Updating on My Wayland Desktop

Pin a Flatpak App to a Fixed Version on Wayland

Flatpak apps are great for sandboxing, but the automatic update loop can be a nuisance when a new release breaks a workflow or introduces a regression. On a Wayland‑based desktop (GNOME, KDE, etc.) the update mechanism is the same as on X11, so the steps below work everywhere.

1. Inspect the current version

flatpak info com.spotify.Client

The output shows the installed commit hash and the remote’s latest commit. If you’re running a version that you want to keep, note the commit hash:

[Read More]

Taming Removable Drives with Udev Rules

Automount tweaks for desktop Linux

Introduction to Taming Removable Device Chaos

I’ve lost count of how many times I’ve struggled with removable devices on Linux. Whether it’s a USB drive, an SD card, or an external hard drive, these devices can be a real hassle. But over the years, I’ve learned a thing or two about how to keep them in check using Udev rules and automount tweaks.

Understanding Udev

Udev is the device manager for Linux, and it’s what creates device nodes in the /dev directory and handles device hotplugging. The real trick is using Udev rules to customize its behavior. To get started, you’ll need to create a new file in the /etc/udev/rules.d directory. I usually start with a file like 99-removable-devices.rules, which you can create using the following command:

[Read More]

Fixing DNS Leaks in systemd-resolved

Troubleshooting resolver errors on a Linux desktop

Introduction to systemd-resolved

I’ve spent years working with Linux, and one component that’s given me trouble is systemd-resolved, the DNS resolver service that comes bundled with systemd. Recently, I noticed my DNS queries were leaking, and I was getting annoying resolver errors on my Linux desktop. This prompted me to dive deeper into systemd-resolved and figure out how to tame it. I’ve seen this go wrong when people don’t take the time to understand how it works, so let’s start with the basics.

[Read More]

Troubleshooting Slow Log Rotation in Small Linux Servers with High IO Workloads

Introduction to Log Rotation

I’ve seen log rotation become a major issue on small servers with high IO workloads - it’s a problem that can sneak up on you quickly. Logs can grow at an alarming rate, and if you don’t manage them properly, they can fill up your disk space in no time. The real trick is to stay on top of log rotation, and that’s where tools like logrotate come in.

[Read More]

Introduction to Firewalld

Managing Firewalls with firewalld and firewall-cmd

Firewalls are essential for securing your Linux system from unauthorized access and potential attacks. Among the various tools available, firewalld is a powerful yet user-friendly firewall management solution designed to make configuring and managing firewalls simpler. This guide introduces firewalld and its companion tool, firewall-cmd, breaking down their features and basic usage.

What is Firewalld?

firewalld is a dynamic firewall management tool that provides a way to configure firewall rules without disrupting active connections. It’s widely used on modern Linux distributions like Fedora, Red Hat Enterprise Linux, AlmaLinux, and CentOS.

[Read More]

tcpdump

The Ultimate Packet Analysis Tool for Network Professionals

In the world of networking, understanding how data flows across a network is critical for troubleshooting, security, and performance optimization. One of the most powerful tools at a network professional’s disposal is tcpdump. This command-line packet analyzer allows users to capture, filter, and dissect network traffic in real time, offering unmatched insights into what is happening on the wire.

Learn more about tcpdump on its official website, where you can find documentation, examples, and updates.

[Read More]