diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-10-11 09:16:26 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-10-11 09:16:26 +0200 |
commit | a736cf28b5fcd3a1d2ca85d8c2b0949b54cd85d4 (patch) | |
tree | 2020175abcbe8b79667ae547b4c845660e5aef7e | |
parent | e97b98d7c3117f2aee7349fb17f58492bcafb8d2 (diff) |
Xsession: add FIDO keys on startup, if present
-rw-r--r-- | dotfiles/Xsession | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dotfiles/Xsession b/dotfiles/Xsession index 473e1b8..7ad3423 100644 --- a/dotfiles/Xsession +++ b/dotfiles/Xsession @@ -15,6 +15,9 @@ run_if_exists fbxkb # clipboard manager run_if_exists parcellite +# if any FIDO HW tokens are plugged in, add them to SSH agent +(which fido2-token > /dev/null) && [ $(fido2-token -L | wc -l) -gt 0 ] && (ssh_sk_add < /dev/null &) + # on FIDO HW key add/remove, update the SSH agent udev_match --subsystem=hidraw --match=ACTION=remove --match=ID_FIDO_TOKEN=1 ssh_sk_clean & udev_match --subsystem=hidraw --match=ACTION=add --match=ID_FIDO_TOKEN=1 ssh_sk_add & |