r/linux • • 5h ago

Tips and Tricks Auditing every SSH key sshd accepts, including keys outside ~/.ssh

0 Upvotes

If you audit SSH keys by checking ~/.ssh/authorized_keys, you can miss keys sshd will happily accept. AuthorizedKeysFile can point anywhere: lots of shops use something like /etc/ssh/auth_keys/%u so users can't manage their own keys, and it can list several paths. It can also be overridden per user or group in Match blocks. Even the default includes ~/.ssh/authorized_keys2, which is easy to forget.

If you already run osquery or a compliance platform, you may have some of this covered. This is a lightweight approach for ad hoc audits that uses only jc (a tool I maintain that converts command output and config files to JSON), jq, and sshd's own view of its config.

1. Ask sshd where it looks for keys

sshd -T prints the effective config, with includes and defaults resolved. Adding -C evaluates Match blocks for a specific connection, so you get the answer for a particular user:

$ sudo sshd -T -C user=alice,host=localhost,addr=127.0.0.1 | jc --sshd-conf | jq -r '.authorizedkeysfile[]'
/etc/ssh/auth_keys/%u
.ssh/authorized_keys

2. Expand the paths for every account and parse each file

#!/usr/bin/env bash
getent passwd | jc --passwd | jq -r '.[] | "\(.username) \(.uid) \(.home)"' |
while read -r user uid home; do
    # Ask sshd for this user's effective AuthorizedKeysFile (honors Match User/Group)
    paths=$(sshd -T -C user="$user",host=localhost,addr=127.0.0.1 |
            jc --sshd-conf | jq -r '.authorizedkeysfile[]?')
    for p in $paths; do
        [[ $p == none ]] && continue
        f=${p//%%/$'\001'}                    # protect literal %%
        f=${f//%u/$user}; f=${f//%U/$uid}; f=${f//%h/$home}
        f=${f//$'\001'/%}
        [[ $f != /* ]] && f="$home/$f"        # relative paths are relative to $HOME
        [[ -r $f ]] || continue
        jc --authorized-keys < "$f" |
            jq -c --arg u "$user" --arg f "$f" '.[] | . + {user: $u, file: $f}'
    done
done > keys.jsonl

Run it as root so sshd -T works and every file is readable. Using getent means LDAP/SSSD accounts are included, not just local ones in /etc/passwd. The script expands all four tokens AuthorizedKeysFile supports: %u, %U, %h, and %%.

Each line of keys.jsonl is one key, tagged with its owner and the file it came from:

{"options":[],"type":"ssh-ed25519","key":"AAAA...","comment":"kelly@laptop","user":"alice","file":"/home/alice/.ssh/authorized_keys"}
{"options":[],"type":"ssh-rsa","key":"AAAA...","comment":"backup@nas","user":"bob","file":"/etc/ssh/auth_keys/1001"}

3. Ask questions

Keys with no from= or command= restriction:

jq -r 'select(any(.options[]; startswith("from=") or startswith("command=")) | not)
       | "\(.user)  \(.type)  \(.comment // "(no comment)")  \(.file)"' keys.jsonl

Users who still have keys in ~/.ssh when policy says they should only be in /etc/ssh/auth_keys:

jq -r 'select(.file | test("/\\.ssh/")) | "\(.user)  \(.file)"' keys.jsonl | sort -u

The same key authorized for more than one account:

jq -s -r 'group_by(.key)[] | select(length > 1)
          | "\(.[0].comment // "(no comment)"): \(map(.user) | unique | join(", "))"' keys.jsonl

Legacy RSA/DSA keys:

jq -r 'select(.type == "ssh-rsa" or .type == "ssh-dss") | "\(.user)  \(.comment)  \(.file)"' keys.jsonl

Why not awk? authorized_keys lines can start with an options field containing quoted values with spaces (command="/usr/bin/rsync --server ..."), so field positions shift from line to line. awk '{print $1}' returns an option string instead of a key type, and grep -v command= also drops keys whose comment happens to mention it. The parser splits options into an array and keeps quoted values intact.

Limitations:

  • The audit evaluates Match blocks as a local connection (host=localhost,addr=127.0.0.1). If you have Match Address or Match Host rules that change AuthorizedKeysFile for remote sources, run it again with those values.
  • AuthorizedKeysCommand setups, where keys come from LDAP or an API instead of files, aren't covered. That command's output is in authorized_keys format, though, so you should be able to pipe it to jc --authorized-keys the same way.
  • None of this tells you whether a user's private key has a passphrase, and nothing on the server can. A commenter on r/bash made this point. If it matters to you, SSH certificates with short validity windows are the better fix. The same sshd -T output shows trustedusercakeys and authorizedprincipalsfile, so you can audit that setup too.

More jc examples (calendars, headerless CSVs, etc.): JC Tips and Tricks – Part 3


r/linux • • 11h ago

Kernel Tyr, the Rust driver for Arm Mali GPUs, can now boot GPU firmware in mainline Linux 7.3

4 Upvotes

Some context: Tyr is a Rust port of Panthor, the existing C driver for the Mali-G610 (found in RK3588 boards like the Orange Pi 5 and Rock 5B). As of Linux 7.3 it can boot the GPU's microcontroller using Rust memory-management abstractions that are now upstream.

It's not a replacement for Panthor yet. Job scheduling is still to come. But it's one of the first real users of the kernel's Rust DRM infrastructure, which future Rust drivers will build on.

Write-up: https://www.collabora.com/news-and-blog/blog/2026/10/21/upstreaming-tyr-rust-drm-and-the-linux-kernel/


r/linux • • 11h ago

Software Release DMS 2.0: Rebranded to dux, comprehensive redesign, lyrical engine, file manager, new plugin types, and much more.

Thumbnail duxlabs.dev
43 Upvotes

Dank Linux is now Dux Labs. DankMaterialShell is now Dux Shell, and the whole suite is moving under one name: Dux Greeter, Dux Search, Dux GOP, Dux Calendar, and a new member, Dux Files. It's the same team and the same projects, and it's a huge step for everything we're building. This was a massive undertaking and there will be some bumps along the way while we get it all in order.

What's new

DMS 2.0 introduces a full Material 3 Expressive redesign alongside our heavily overhauled, pluggable Dashboard and more flexible Control Center. This release also brings the new syllable synced lyrics with the dux lyrical engine, free floating dux dot bar companion/replacement, a fully customizable lock screen/greeter compatible with existing desktop widgets, and a whole lot more. Read the blog for all of the details and screenshots.

Thank you

A huge thank you to everyone who landed code (65 of us this cycle), and to every plugin author, translator, packager, tester, and sponsor on GitHub and Ko-fi. Thank you to the two new designers who helped pioneer the redesign with comprehensive mockups, iteration, and code.


r/linux • • 4h ago

Software Release Dahua SmartPSS Lite running on Linux via Wine (P2P, NVR/XVR, device web UI): install scripts

1 Upvotes

This is merely some scripts to run SmartPSS Lite. It is 3-4 times faster than Windows version. It's unbelievable!

So, I support customers who use Dahua P2P cameras and NVR/XVR recorders, and the official client (SmartPSS Lite) is Windows-only. Sometimes I support people at home, which I have Linux PC for that. So, I didn't want to keep a Windows install around just for that, so I got it running under Wine.

Running the installer directly with Wine didn't work for me, so the scripts skip it: they unpack the installer with 7z, copy the app into a private Wine prefix, install Microsoft's VC++ runtime and apply one Wine setting. Without these two last steps the app showed a black screen after login and kept crashing in a loop.

What works (tested on Debian 13, Pardus 25 and Devuan 6, WineHQ stable 11): first-run admin setup, adding devices by IP and by serial number (P2P), opening the device's web UI from the client, live view. In my experience P2P connections and the web pages are noticeably faster than on Windows.

What I haven't tested: playback of recordings, long-term use, many cameras. Live view can still be slow over VNC/remote desktop or with many streams, and there is no hardware decoding under Wine.

The repo contains only scripts and docs. You download SmartPSS Lite yourself from dahuasecurity.com (not the Dahua Wiki build, which is outdated). Nothing from Dahua or Microsoft is redistributed.

Repo (English/Turkish docs): https://github.com/EmreYavuzalp/smartpss-lite-linux

Feedback and test reports on other distros are welcome. Unofficial, no warranty.


r/linux • • 1h ago

Software Release spdng: a dependency-free speedtest CLI with an mtr-style traceroute in curses

• Upvotes

I wanted a speedtest tool and ended up writing one, mostly because the obvious one (speedtest-cli) has been archived since 2024 and has some interesting bugs.

spdng is pure standard library - no requests, no rich, no texttable. Just http.client, socket, concurrent.futures and curses.

The part I enjoyed most was the traceroute. Getting per-hop results fast needs every TTL probed concurrently rather than one after another, which means you need ICMP error delivery to an unprivileged socket. There are three ways to get it and they have different tradeoffs:

  • Raw ICMP sockets work but need CAP_NET_RAW.
  • The ping binary works unprivileged wherever it has cap_net_raw=ep, which is most modern Linux distros. You parse its output instead of opening a socket.
  • UDP with IP_RECVERR is the clean one, but it is Linux-only.

So it probes in parallel with all three, uses whichever is available, and degrades gracefully. spdng doctor tells you which one it picked and why.

Two portability traps I hit, both of which are now tests:

  • ping means different things on Linux and BSD. On macOS -t is the timeout and the TTL is -h; on Linux it is the other way around. The timeout unit differs too - Linux takes seconds, BSD takes milliseconds. Get the command line wrong and every hop looks like the final hop, with no error message at all.
  • The IP socket option numbers are platform-specific. IP_TTL is 2 on Linux and 4 on BSD and macOS, so a hardcoded number silently sets the wrong option off Linux.

    pip install spdng

    spdng live 1.1.1.1 spdng speedtest --trace spdng doctor

Source: https://github.com/patpadgett/spdng

The CI matrix is Linux and macOS across Python 3.10-3.13, and every platform bug above came out of it. A Linux-only test run found none of them.


r/linux • • 13h ago

Software Release RiftLinux 0.1.0: the Oculus Rift CV1 on Linux, with tracked Touch controllers, room scale and SteamVR

Thumbnail github.com
5 Upvotes

I've been working on getting my Oculus Rift CV1 to work properly on Linux, and today I put out the first release on GitHub.

RiftLinux is a driver for the Oculus Rift CV1, its Constellation sensors and its Touch controllers. It's a modified Monado, specialized for this one headset, and it installs as a single package. No Windows, no Oculus app, no Meta account, and it doesn't need OpenHMD or upstream Monado either.

Why bother with a 2016 headset: plenty of people still might have an Oculus Rift CV1 stored away somewhere 😄, at least I do, and it still holds up well as a lightweight PCVR headset with OLED panels. On Linux the options were OpenHMD, which its own README now marks as unmaintained and which tracks the Touch controllers' rotation only, and upstream Monado, whose Rift CV1 support is still experimental: its sensor calibration and Touch tracking work is still waiting in open merge requests.

RiftLinux began by trying those two merge requests, but they were incomplete: the controllers barely tracked. What it has now was built from there. The tracking was reworked and checked against the Oculus runtime's own data, by day and by night: mirrored and flipped controller poses, the Touch controllers' IMU calibration, bright rooms where the sensors pick up sunlit spots, and the LED and radio settings the Oculus runtime uses, read from its USB traffic. The sensors are placed from your movement, with no setup app, found and placed again when one is moved or knocked (even mid-game), levelled by the headset's gravity, and measured again by themselves when moved too far. For room scale, the LEDs on the back of the headband are measured on your headset and tracked, so a sensor behind you keeps tracking it. On top of that came the SteamVR integration, the picture pipeline (direct mode, Auto-HDR, motion smoothing/ASW), controller pairing worked out from the Oculus app's USB traffic, and the one-package install.

Additionally, I mostly use Linux full time, and having to switch to Windows just to use the Rift CV1 and fly VTOL VR or other sims was getting painful, especially with Windows updates (Waiting forever) and Meta's support for the CV1 on Windows getting worse.

What works:

  • Head and Touch controller tracking (6DoF) with two sensors. Room scale with three (or more): the LEDs on the back of the headband are measured on your headset and tracked, like the Oculus runtime does, so you can turn all the way around.
  • The sensors are measured from your movement and saved. If you move or knock one, it's found and placed again automatically.
  • SteamVR: native games and Windows VR games through Proton. I've played No Man's Sky VR, VTOL VR and Bigscreen with it. OpenXR apps also run without SteamVR, on RiftLinux's own runtime.
  • Pairing Touch controllers without Windows (`riftlinux-setup pair`).
  • The Oculus button opens a menu in the headset: headphone volume, microphone, floor height, picture settings.
  • The CV1's true render resolution, and motion smoothing similar to ASW 1.0 when a game can't hold 90 fps.
  • An optional Auto-HDR for the OLED panels (SDR to HDR), on X11 and Wayland alike.
  • HDR supported games are shown as HDR, and a video player can hand over its HDR10, HDR10+ or DV metadata (through an OpenXR extension or the driver's socket); no player does that yet.
  • X11 and Wayland (GNOME and KDE Plasma).

How the tracking compares with the Oculus runtime: the sensors' camera frames, and the poses Oculus computed from them, were captured over USB on Windows. RiftLinux's tracker then ran on those same frames and was scored against Oculus' poses. For each kind of movement, it keeps the controllers tracked within 1-2 percentage points of what Oculus managed.

Packages: .deb (Debian, Ubuntu, Mint, Pop!_OS), Arch, Fedora .rpm, and a tarball for everything else. x86-64 only.

Licence: BSL-1.0, the same as Monado.

Tested so far on NVIDIA only (drivers 580 and 615), on Ubuntu 25.04 with GNOME and CachyOS with KDE Plasma. AMD and Intel should work through Vulkan, but I don't have the hardware, so reports from AMD or Intel users are welcome.

Known issues are in the README, each linked to the bug in the project it belongs to. The one you're most likely to hit: Steam's client can crash when a flat (non-VR) game opens a window while SteamVR is running. That's a SteamVR for Linux bug (#963), not the driver.

If tracking misbehaves for you, `riftlinux-setup record on` records a session I can replay to see what went wrong; the bug report form explains how to attach it.

Rift CV1 owners on Linux might want to dust off their headsets and give it a try!


r/linux • • 15h ago

Kernel AI disclosure is no longer required for the Linux Kernel

Post image
688 Upvotes

r/linux • • 15h ago

GNOME GNOME OS [Nightly/Preview]

Thumbnail
0 Upvotes

r/linux • • 3h ago

Hardware Affordable USB fingerprint reader working on Linux — Chipsailing CS9711 (2541:0236)

4 Upvotes

I've been using the Chipsailing CS9711 USB fingerprint reader on Arch-based Linux with KDE Plasma, and it works with a community-maintained `libfprint` driver.

Fingerprint enrollment and authentication work through `fprintd`, including system login and authentication prompts.

**Hardware:**

* Model: Chipsailing CS9711

* USB ID: `2541:0236`

* Small USB fingerprint reader compatible with Windows Hello

* Requires a custom `libfprint` build on Linux

**Linux drivers and installation:**

* Original community driver: [https://github.com/archeYR/libfprint-CS9711\](https://github.com/archeYR/libfprint-CS9711)

* My patched fork: [https://github.com/thankarezos/libfprint-CS9711/tree/cs9711-rebase\](https://github.com/thankarezos/libfprint-CS9711/tree/cs9711-rebase)

* Arch-based distributions AUR package: [https://aur.archlinux.org/packages/libfprint-chipsailing-cs9711-git\](https://aur.archlinux.org/packages/libfprint-chipsailing-cs9711-git)

For users of **Arch Linux and Arch-based distributions** (such as EndeavourOS, CachyOS, and Manjaro), the AUR package offers a more convenient installation method than manually compiling the driver. Compatibility may depend on the distribution and its package versions.

**Fingerprint management GUI (experimental):**

* Fingerprint Manager AUR package: [https://aur.archlinux.org/packages/fingerprint-manager-git\](https://aur.archlinux.org/packages/fingerprint-manager-git)

There's also a fingerprint management GUI available through the AUR for users who prefer managing fingerprints graphically rather than through the terminal.

**Disclaimer:** This application was vibe-coded (developed with significant AI assistance). Treat it as experimental and use it at your own risk. It hasn't necessarily undergone the same level of code review or security auditing as established Linux authentication tools.

**Limitations and upstream development:**

The driver uses SIGFM fingerprint matching. Because of the sensor's small capture area, finger positioning matters during authentication.

SIGFM is currently being proposed for inclusion in upstream `libfprint`:

* **SIGFM upstream merge request (!530):** [https://gitlab.freedesktop.org/libfprint/libfprint/-/merge\\_requests/530\](https://gitlab.freedesktop.org/libfprint/libfprint/-/merge_requests/530)

This is an important step toward broader support for fingerprint sensors that rely on SIGFM, although merging SIGFM alone won't automatically add support for the CS9711 hardware.

The CS9711 is not yet officially supported by upstream `libfprint`.

**Where to buy:**

The reader is listed on both Alibaba and AliExpress:

* **Alibaba:** [https://www.alibaba.com/product-detail/Boland-USB-Fingerprint-Reader-Windows-Hello\\_1601939777133.html?spm=a2756.order-detail-ta-ta-b.0.0.404ef19cdZwdJz\](https://www.alibaba.com/product-detail/Boland-USB-Fingerprint-Reader-Windows-Hello_1601939777133.html?spm=a2756.order-detail-ta-ta-b.0.0.404ef19cdZwdJz)

* **AliExpress:** [https://www.aliexpress.com/item/1005009201507961.html?spm=a2g0o.order\\_list.order\\_list\\_main.47.ee3c1802OFxniE\](https://www.aliexpress.com/item/1005009201507961.html?spm=a2g0o.order_list.order_list_main.47.ee3c1802OFxniE)

The AliExpress listing no longer appears to ship to EU countries, so Alibaba may be an alternative for European buyers.

I've ordered additional units through Alibaba and contacted the supplier about Linux compatibility. I also suggested including information about the community driver in their listing.

Make sure to confirm the CS9711 chipset and USB ID `2541:0236` before purchasing, since visually similar readers may use different hardware.

I'm not affiliated with the seller, and this isn't sponsored.

I'm sharing this because finding affordable USB fingerprint readers that actually work on Linux can be surprisingly difficult.

Hopefully, more users testing the device and contributing to development will help bring official upstream support eventually.


r/linux • • 23h ago

Software Release GitHub - microlift/rosemary: Compatibility layer and high level emulator hybrid for running macOS applications across operating systems and architectures

Thumbnail github.com
160 Upvotes

Running macOS GUI applications on Linux, anyone?

This has gained a lot of traction in the past two weeks or so as it only recently got open sourced, but it's currently being used as a method to run Roblox on Linux, instead of running the Android client.


r/linux • • 12h ago

Security ca-certificates eMudhra Security Release

45 Upvotes

https://emudhra.com/en/post/certificate-security-incident

CVE-2026-111943, but also was literally foretold by Randall:

https://xkcd.com/221/

Who is going to patch it first?

  • Debian: 2026-10-20 15:45 repo
  • - Ubuntu: (non-pro) 2026-10-20 15:55 repo
  • Fedora: ? repo
  • - Alma: ? repo
  • - Rocky: ? repo
  • - CentOS Stream: ? repo
  • openSUSE: ? repo
  • Alpine: 2026-10-20 15:12 repo
  • Arch: 2026-10-20 10:11 repo
  • Gentoo: 2026-10-20 10:22 repo

Only tracks versions not patches/build dates: https://repology.org/project/ca-certificates/versions


r/linux • • 6h ago

Security php2shell (CVE-2026-109618, CVE-2026-109619): Patched PHP packages available in testing

Thumbnail almalinux.org
18 Upvotes

r/linux • • 9h ago

Event Rocky Mountain Linux Fest 2027

17 Upvotes

SAVE THE DATE: AUGUST 7, 2027!

Rocky Mountain Linux Fest is coming to Denver, Colorado!

Mark your calendars and get ready for a day of Linux, open source, and community!

More details coming soon!

#RockyMountainLinuxFest #Linux #OpenSource #LinuxCommunity #OpenSourceCommunity #DenverTech #LinuxFest #FOSS #ColoradoTech #SaveTheDate


r/linux • • 16h ago

Kernel XFS Sees Small Performance Optimizations & Bug Fixes For Linux 7.4

Thumbnail phoronix.com
18 Upvotes

r/linux • • 7h ago

Development AMD Working On Ryzen Overclocking Driver For Linux

Thumbnail phoronix.com
240 Upvotes

r/linux • • 3h ago

Software Release KeePassXC 2.8.0 (Stable) released

Thumbnail keepassxc.org
83 Upvotes