Skip to content

Instantly share code, notes, and snippets.

@bastos
Created February 25, 2026 23:53
Show Gist options
  • Select an option

  • Save bastos/95bcb350394b23f96cb9e3a623d64721 to your computer and use it in GitHub Desktop.

Select an option

Save bastos/95bcb350394b23f96cb9e3a623d64721 to your computer and use it in GitHub Desktop.

ykman: YubiKey Static Password for Mac Login (Real-World)

Real users prefer Slot 2 (avoids accidental triggers).

Install

brew install ykman

Verify

ykman info

Setup (Slot 2 - Long Press)

ykman otp static 2 "yourpassword" --keyboard-layout us --force
ykman otp settings 2 -p 60 --no-enter

Use

  1. Plug YubiKey
  2. Click password field
  3. Long press button 2–3 sec

Test first in TextEdit.

Mac Issues?

Grant Terminal Input Monitoring in System Settings → Privacy & Security.

Delete

ykman otp delete 2 -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment