MacOS:
brew install pam-u2f
For Arch Linux:
pacman -S pam-u2f
mkdir -p ~/.config/Yubico/
pamu2fcfg > ~/.config/Yubico/u2f_keys
pamu2fcfg -n >> ~/.config/Yubico/u2f_keys
For MacOS, add on the first line of /etc/pam.d/sudo
:
auth sufficient /opt/homebrew/Cellar/pam-u2f/1.2.1/lib/pam/pam_u2f.so
For Linux, same first line of /etc/pam.d/sudo
, but different content:
auth sufficient pam_u2f.so