Import the key and cert (PEM format) in slot 9a:
$ yubico-piv-tool -s 9a -a import-key -i key.pem $ yubico-piv-tool -s 9a -a import-certificate -i cert.pem
$ yubico-piv-tool -s 9a -a import-certificate -i cert.pem
Import the key and cert (PKCS12 format) in slot 9a:
$ yubico-piv-tool -s 9a -a import-key -a import-cert -i key.p12 -K PKCS12