Hi friends! Has anyone here had success using Yubikeys on Linux? I’ve been going back and forth with support to no avail, trying to get my Yubikey 5C NFC to play nicely on Ubuntu 22.04 LTS. Any suggestions are appreciated.

I have the following Yubikey-related packages on my system:

libyubikey-udev 1.20.0-3 [Ubuntu/jammy universe]
├── is installed
└── udev rules for unprivileged access to YubiKeys

libyubikey0 1.13-6 [Ubuntu/jammy universe]
├── is installed
└── Yubikey OTP handling library runtime

python3-yubikey-manager 4.0.7-1 [Ubuntu/jammy universe]
├── is installed
└── Python 3 library for configuring a YubiKey — transitional package

yubikey-manager 4.0.7-1 [Ubuntu/jammy universe]
├── is installed
└── Python library and command line tool for configuring a YubiKey

yubikey-manager-qt 1.2.4-1 [Ubuntu/jammy universe]
├── is installed
└── Graphical application for configuring a YubiKey

yubikey-personalization-gui 3.1.24-1build1 [Ubuntu/jammy universe]
├── is installed
└── Graphical personalization tool for YubiKey tokens

libfido2-1 1.10.0-1 [Ubuntu/jammy main]
├── is installed
└── library for generating and verifying FIDO 2.0 objects

python3-fido2 0.9.1-1 [Ubuntu/jammy universe]
├── is installed
└── Python library for implementing FIDO 2.0

pcscd 1.9.5-3ubuntu1 [Ubuntu/jammy universe]
├── is installed
└── Middleware to access a smart card using PC/SC (daemon side)

UPDATE: After working my way down the entire software stack, I contacted the vendor of my USB-C port and requested a replacement. It did the trick…

  • jaxxed@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    8 months ago

    yubikey works on every linux distro I have tried, and even on freebsd. Some people say it “works out of the box” but that part is not true on every distro. Every distro will recognize the device when it is plugged in, but not every distro will all 2FA actions out of the box, and almost no distro comes with the management tools.

    On linux (and BSD) you can install a CCID tool to get the 2FA, which installs software that needs to be running (you can use the yubikey as a keyboard approach if you really need it) On Linux you can install a manager tool like ykman is easy, if you want to manage the tooling on your card On Linux you can setup PAM (authentication) so that yubikey can be used for logins, sudo auth etc On Linux you can use yubikey to do advanced things like manage the encryption keys for encrypted disks

    As always, off to the Arch docs: https://wiki.archlinux.org/title/YubiKey

    • Irdial@lemmy.sdf.orgOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      8 months ago

      I appreciate the detailed response. I looked at the Arch wiki page and ensured that I have all packages listed. Still, the output of ykman info is “Error: No YubiKey detected!” :P

        • Irdial@lemmy.sdf.orgOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 months ago

          I do not get any messages. I’m starting to think there is an issue with my motherboard’s USB-C port. If I can get my hands on a USB-C to USB-A adapter, I can test this theory…

  • /home/pineapplelover@lemm.ee
    link
    fedilink
    arrow-up
    8
    ·
    8 months ago

    It works fine straight out of the box. If you need the totp codes, personalization, setting it up download the yubikey apps (probably in your apt repo or check documentation)

  • floofloof@lemmy.ca
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    8 months ago

    I use my Yubikeys all the time in OpenSUSE Tumbleweed and Linux Mint - a Yubikey 5 NFC and a Yubikey 5C NFC (mostly with Firefox). I have never had any problems with them. Mint is Ubuntu-based so they ought to work in Ubuntu. Sorry I can’t advise you on why yours isn’t working, but it should definitely be possible to get it working.

  • 8osm3rka@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    8 months ago

    Are you talking about 2FA login for your own user account or U2F/PIV/WebAuthn in your browser? The latter seems to work out of the box on any non-snap or flatpak browser, but the former needs a bit more setup as that is not a standard feature in Ubuntu yet. I recommend using ykman and yubico-piv-tool for configuring yubikeys in linux, but Yubico also provides a GUI application on their website

  • Dr. Wesker@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    8 months ago

    I’m on Debian, but I think I’ve only ever used mine in Librewolf. But I can verify it works fine for me in the browser.

  • berg@lemm.ee
    link
    fedilink
    arrow-up
    1
    ·
    8 months ago

    I used to use one without any issues, it wasn’t the 5 series but it had NFC. The worst part was setting up to use it as an ssh key. Just normal 2FA with it worked straight out of the box (firefox/arch). Is that what you’re trying to do?

    • Irdial@lemmy.sdf.orgOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      Unfortunately, pcscd is running… At this point I am thinking it is a hardware issue with my setup