# No .PEM generated when using --pem mode in elasticsearch-certutil

**URL:** <https://discuss.elastic.co/t/no-pem-generated-when-using-pem-mode-in-elasticsearch-certutil/347046>\
**Category:** Elasticsearch\
**Created:** [November 13, 2023, 5:25pm UTC](https://discuss.elastic.co/t/no-pem-generated-when-using-pem-mode-in-elasticsearch-certutil/347046 "2023-11-13T17:25:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![carel0x53](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carel0x53/32/127511_2.png) [@carel0x53](https://discuss.elastic.co/u/carel0x53)\
**Post date:** [November 13, 2023, 5:25pm UTC](https://discuss.elastic.co/t/no-pem-generated-when-using-pem-mode-in-elasticsearch-certutil/347046/1 "2023-11-13T17:25:25Z")

</div>

I'm trying to generate a PEM certificate for elasticsearch using elasticsearch-certutil by introducing the following line

```auto
bin/elasticsearch-certutil ca --pem

```

Then, the program asks me to set a name for the resulting .zip . However, when finishing executing it, no .PEM has been issued from the program into the elasticsearch root directory.

I executed the program as root, using Elasticsearch 8.11 (the latest version up to date)

I appreciate any suggestion

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [November 13, 2023, 5:29pm UTC](https://discuss.elastic.co/t/no-pem-generated-when-using-pem-mode-in-elasticsearch-certutil/347046/2 "2023-11-13T17:29:51Z")

</div>

Hello and welcome,

> [@carel0x53](#):
>
> Then, the program asks me to set a name for the resulting .zip . However, when finishing executing it, no .PEM has been issued from the program into the elasticsearch root directory.

This is expected, it will create a zip file with the certificate and key in _ **PEM format** _, it will not create a `.pem` file, it will create a `.crt` and a `.key` file.

---

<div class="post-metadata">

**Author:** ![carel0x53](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carel0x53/32/127511_2.png) [@carel0x53](https://discuss.elastic.co/u/carel0x53)\
**Post date:** [November 13, 2023, 5:32pm UTC](https://discuss.elastic.co/t/no-pem-generated-when-using-pem-mode-in-elasticsearch-certutil/347046/4 "2023-11-13T17:32:25Z")

</div>

So, if I want to use it in logstash, do I have only to change the extension .pem?

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [November 13, 2023, 5:37pm UTC](https://discuss.elastic.co/t/no-pem-generated-when-using-pem-mode-in-elasticsearch-certutil/347046/5 "2023-11-13T17:37:08Z")

</div>

> [@carel0x53](#):
>
> So, if I want to use it in logstash, do I have only to change the extension .pem?

In the Elasticsearch output?

No, you need to use just the `.crt` file.

```auto
ssl_certificate_authorities => '/path/to/file/ca.crt'

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 11, 2023, 5:37pm UTC](https://discuss.elastic.co/t/no-pem-generated-when-using-pem-mode-in-elasticsearch-certutil/347046/6 "2023-12-11T17:37:39Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
