djcp / yubitoggle

Disable/enable yubikeys on linux via good ol' xinput

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yubitoggle

Use xinput to toggle a yubikey on and off. This allows you to keep the key plugged in and not worry about accidentally entering tokens with errant touches.

Getting started

  • Clone this repo
  • Install xinput through your package manager.
  • Put yubitoggle somewhere on path. It doesn't require any special privileges.
  • Run yubitoggle If all goes well, your yubikey will be enabled / disabled.
  • You can run DEBUG=1 yubitoggle to get some basic debugging info.
  • yubitoggle --state will tell you if the yubikey is off or on. "0" == off, "1" == on. This is useful in scripts.
  • Use yubitoggle --off or yubitoggle --on to turn it explicitly off or on rather than toggling

Known issues

  • This only works for a single yubikey.
  • Only tested on ubuntu 16.04 but should work on a bunch of linuxes.

See also

Contributors

  • Dan Collis-Puro

License

MIT

About

Disable/enable yubikeys on linux via good ol' xinput


Languages

Language:Shell 100.0%