LinuxCommandLibrary

gpg-card

Administrate OpenPGP and PIV smart cards.

TLDR

Start in interactive mode

$ gpg-card
copy


Invoke one or more commands non-interactively
$ gpg-card [command1] -- [command2] -- [command3]
copy


Show information about a smart card
$ gpg-card list
copy


Retrieve the public key using the URL stored on an OpenPGP card
$ gpg-card fetch
copy


Set the URL used by the fetch command
$ gpg-card url
copy


Change or unblock PINs (uses the default action for the card in non-interactive mode)
$ gpg-card passwd
copy


Toggle the forcesig flag of an OpenPGP card (i.e. require entering the user PIN for signing)
$ gpg-card forcesig
copy


Factory reset a smart card (i.e. delete all data and reset PINs)
$ gpg-card factory-reset
copy

Copied to clipboard