Sample Header Ad - 728x90

Trying to automate yubikey deployment in my workplace

1 vote
1 answer
298 views
I am trying to write a basic script that will run the gpg --card-edit command on any connected yubikey and generate an RSA 4096 key pair on the card #!/usr/bin/env bash red=tput setaf 1 green=tput setaf 2 reset=tput sgr0 set -euf set -o pipefail echo "${red}script started${reset}" echo " ${red}run card edit ${reset}" gpg --card-edit --command-fd - < ~/bin/yubikey/input2.txt The input2.txt contains the commands I want to run: admin generate I cannot figure out a way to handle the PIN promt that I get from gpg so I get this error gpg: error checking the PIN: Inappropriate ioctl for device
Asked by Frank Perrakis (11 rep)
Oct 23, 2017, 04:20 PM
Last activity: Oct 2, 2022, 08:28 PM