# Filebeat private key parse error

**URL:** <https://discuss.elastic.co/t/filebeat-private-key-parse-error/119633>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [February 13, 2018, 12:33pm UTC](https://discuss.elastic.co/t/filebeat-private-key-parse-error/119633 "2018-02-13T12:33:13Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![adrisr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrisr/32/25423_2.png) [@adrisr](https://discuss.elastic.co/u/adrisr)\
**Post date:** [February 14, 2018, 5:09pm UTC](https://discuss.elastic.co/t/filebeat-private-key-parse-error/119633/6 "2018-02-14T17:09:00Z")

</div>

There seems to be a problem dealing with encrypted private keys generated by openssl 1.x. The ones generated by openssl 0.9x work.

You can tell the difference in the first few lines of the file.

Works:

```auto
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,5C4A07D0414173B0

```

Doesn't work:

```auto
-----BEGIN ENCRYPTED PRIVATE KEY-----

```

For now the only workaround is to convert your private key to the old format:

```
openssl pkcs8 -in private.key -traditional -out plain.pem
openssl rsa -aes256 -in plain.pem -out encrypted.key

```

Remember to remove plain.pem as it is not encrypted.

---

_[View the full topic](https://discuss.elastic.co/t/filebeat-private-key-parse-error/119633)._
