EventScripts to automatically add keys to SSH Agent from your Yubikey.
Yubikey or other PKCS11 compatible token
- Checkout git repository
- Copy askpass.sh to /usr/local/bin
- Create new keychain with name yb
- In Keychain yb create new item "application password" with name yb. Password is your password for Yubikey.
- Compile scripts
osacompile -o insert-yubikey.scpt insert-yubikey.applescript
osacompile -o remove-yubikey.scpt remove-yubikey.applescript
- Copy insert-yubikey.scpt and remove-yubikey.scpt in to EventScripts script folder.
- Add two events:
- USB device attached -> insert-yubikey.scpt
- USB device removed -> remove-yubikey.scpt
- Insert your Yubikey