machine_setup/ansible/roles/gpg/files/yubikey_relearn_keys

11 lines
316 B
Plaintext
Raw Normal View History

2022-10-16 04:32:44 +00:00
#!/usr/bin/env bash
#
# GPG associates token serial numbers with keys. When switching to
# another hardware token, run this script to associate the new token
# with the keys.
set -euo pipefail
IFS=$'\n\t'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
gpg-connect-agent "scd serialno" "learn --force" /bye