> For the complete documentation index, see [llms.txt](https://yubico.gitbook.io/yubikey5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://yubico.gitbook.io/yubikey5/tutorials/ssh-+-putty-cac/configs/gpg-agent.conf.md).

# gpg-agent.conf

GPG config file used to manage the agent daemon. Edits are required to make Yubikey and SSH / PuTTY work together.

<mark style="color:red;">**gpg-agent**</mark> is a daemon to manage secret (private) keys independently from any protocol. It is used as a backend for <mark style="color:red;">**`gpg`**</mark> and <mark style="color:red;">**`gpgsm`**</mark> as well as for a couple of other utilities.

The agent is automatically started on demand by <mark style="color:red;">**`gpg`**</mark>, <mark style="color:red;">**`gpgsm`**</mark>, <mark style="color:red;">**`gpgconf`**</mark>, or <mark style="color:red;">**`gpg-connect-agent`**</mark>. Thus there is no reason to start it manually.

### <mark style="color:blue;">**Absolute Path:**</mark>

```
C:\Users\user\AppData\Roaming\gnupg\gpg-agent.conf
```

### <mark style="color:blue;">**Run String:**</mark>

```
%AppData%\gnupg\gpg-agent.conf
```

Modify config to enable Yubikey + PuTTY / SSH:

{% code title="gnupg\gpg-agent.conf" %}

```properties
enable-putty-support
enable-ssh-support
use-standard-socket
default-cache-ttl-ssh 60
max-cache-ttl-ssh 120
default-cache-ttl 60
max-cache-ttl 120
pinentry-program "C:\Program Files (x86)\Gpg4win\bin\pinentry.exe"
```

{% endcode %}

You must add the above code so that you can enable SSH and Putty support. Once the changes have been made; restart the `gpg-agent`:

```
gpg-connect-agent killagent /bye
gpg-connect-agent /bye
```
