# info

## <mark style="color:red;">ykman piv COMMAND ARGS</mark>

<table><thead><tr><th width="184.33333333333331">Command</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;">access</mark></td><td>Manage PIN, PUK and Management Key.</td></tr><tr><td><mark style="color:red;">certificates</mark></td><td>Manage certificates.</td></tr><tr><td><mark style="color:red;">info</mark></td><td>Display general status of the PIV application.</td></tr><tr><td><mark style="color:red;">keys</mark></td><td>Manage private keys.</td></tr><tr><td><mark style="color:red;">objects</mark></td><td>Manage PIV data objects.</td></tr><tr><td><mark style="color:red;">reset</mark></td><td>Reset all PIV data.</td></tr></tbody></table>

<table><thead><tr><th width="184">Options</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:red;">-h, --help</mark></td><td>Show this message and exit.</td></tr></tbody></table>

## <mark style="color:red;">❊ Examples</mark>

#### <mark style="color:blue;">LIST HELP</mark>

{% tabs %}
{% tab title="base" %}

```properties
ykman piv -h


  info          Display general status of the PIV application.
  reset         Reset all PIV data.
  access        Manage PIN, PUK, and Management Key.
  certificates  Manage certificates.
  keys          Manage private keys.
  objects       Manage PIV data objects.
```

{% endtab %}

{% tab title="access" %}

```properties
ykman piv access -h


  change-management-key  Change the management key.
  change-pin             Change the PIN code.
  change-puk             Change the PUK code.
  set-retries            Set the number of PIN and PUK retry attempts.
  unblock-pin            Unblock the PIN (using PUK).
```

{% endtab %}

{% tab title="certificates" %}

```properties
ykman piv certificates -h


  delete    Delete a certificate.
  export    Export an X.509 certificate.
  generate  Generate a self-signed X.509 certificate.
  import    Import an X.509 certificate.
  request   Generate a Certificate Signing Request (CSR).
```

{% endtab %}

{% tab title="info" %}

```properties
ykman piv info -h


  -h, --help  Show this message and exit.
```

{% endtab %}

{% tab title="keys" %}

```properties
ykman piv keys -h


  attest    Generate an attestation certificate for a key pair.
  export    Export a public key corresponding to a stored private key.
  generate  Generate an asymmetric key pair.
  import    Import a private key from file.
```

{% endtab %}

{% tab title="objects" %}

```properties
ykman piv objects -h


  export    Export an arbitrary PIV data object.
  generate  Generate and write data for a supported data object.
  import    Write an arbitrary PIV object.
```

{% endtab %}

{% tab title="reset" %}

```properties
ykman piv reset -h


  -f, --force  Confirm the action without prompting.
  -h, --help   Show this message and exit.
```

{% endtab %}
{% endtabs %}

#### <mark style="color:blue;">PIV INFO</mark>

{% tabs %}
{% tab title="Command" %}

```properties
ykman piv info
```

{% endtab %}

{% tab title="Output" %}

```properties
PIV version: 5.4.3
PIN tries remaining: 5/5
Management key algorithm: AES256
CHUID:  2214d7e739db29ced57ab252a256725678234567812a12345a1aa123456aa123456a123a14342d658bece768a123456789123456789123a11aa01
CCC:    No data available.
```

{% endtab %}
{% endtabs %}

####

#### <mark style="color:blue;">RESET PIV INTERFACE</mark>

{% tabs %}
{% tab title="Command" %}

```properties
ykman piv reset
```

{% endtab %}

{% tab title="Output" %}

```properties
WARNING! This will delete all stored PIV data and restore factory settings. Proceed? [y/N]:
```

{% endtab %}
{% endtabs %}

#### <mark style="color:blue;">**Change the PIN**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">from 123456 to 654321:</mark>

{% tabs %}
{% tab title="Command (Define)" %}

```properties
ykman piv access change-pin
```

{% endtab %}

{% tab title="Command (Dialog)" %}

```properties
ykman piv access change-pin --pin 123456 --new-pin 654321
```

{% endtab %}
{% endtabs %}

#### <mark style="color:blue;">**Generate**</mark> <mark style="color:blue;"></mark><mark style="color:blue;">an ECC P-256 private key and a self-signed certificate in slot 9a:</mark>

{% tabs %}
{% tab title="Generate Key" %}

```properties
ykman piv keys generate --algorithm ECCP256 9a pubkey.pem
```

{% endtab %}

{% tab title="Generate Certificate" %}

```properties
ykman piv certificates generate --subject "yubico" 9a pubkey.pem
```

{% endtab %}
{% endtabs %}
