# Beats input plugin cannot read password protected ssl key

**URL:** <https://discuss.elastic.co/t/beats-input-plugin-cannot-read-password-protected-ssl-key/186771>\
**Category:** Logstash\
**Created:** [June 20, 2019, 10:13pm UTC](https://discuss.elastic.co/t/beats-input-plugin-cannot-read-password-protected-ssl-key/186771 "2019-06-20T22:13:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tterranigma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tterranigma/32/48360_2.png) [@tterranigma](https://discuss.elastic.co/u/tterranigma)\
**Post date:** [June 20, 2019, 10:13pm UTC](https://discuss.elastic.co/t/beats-input-plugin-cannot-read-password-protected-ssl-key/186771/1 "2019-06-20T22:13:09Z")

</div>

I am trying to setup the beats input to use ssl to authenticate to the connecting beats client. This is what I have in my `beats.conf` file:

```auto
# vi:ft=logstash.jinja2
input {
  beats {
    id => 'beat-input'
    port => 5044
    host => '0.0.0.0'
    ssl => true
    ssl_certificate => '/etc/logstash/certs/beat_input/all.crt'
    ssl_certificate_authorities => '/etc/logstash/certs/beat_input/ca.crt'
    ssl_key => '/etc/logstash/certs/beat_input/all.key'
    ssl_key_passphrase => '${beat_input_ssl_key_passphrase}'
    }
}

```

The `beat_input_ssl_key_passphrase` is the variable name I used to add the ssl key passphrase into the logstash keystore. The problem is that when starting Logstash (on Ubuntu 18.04) with systemd I get (it is too long to paste directly):

[https://pastebin.com/BdsqiWcH](https://pastebin.com/BdsqiWcH)

I tried to place the key passphrase as plaintext in the `beat.conf` file but the same error appears. I am using the same key, certificate and ca with elasticsearch without issues. Has anyone managed to get the ssl key passsphrase setting working?

---

<div class="post-metadata">

**Author:** ![tterranigma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tterranigma/32/48360_2.png) [@tterranigma](https://discuss.elastic.co/u/tterranigma)\
**Post date:** [June 20, 2019, 10:59pm UTC](https://discuss.elastic.co/t/beats-input-plugin-cannot-read-password-protected-ssl-key/186771/2 "2019-06-20T22:59:49Z")

</div>

Actually, after hours of research I tend to thing that ssl is broken in (at least) the beats input plugin.

---

<div class="post-metadata">

**Author:** ![tterranigma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tterranigma/32/48360_2.png) [@tterranigma](https://discuss.elastic.co/u/tterranigma)\
**Post date:** [June 21, 2019, 1:50pm UTC](https://discuss.elastic.co/t/beats-input-plugin-cannot-read-password-protected-ssl-key/186771/3 "2019-06-21T13:50:00Z")

</div>

The private key has to be in pkcs8 format. But a password protected key even in this format does not work. I have opened an issue on github: [https://github.com/logstash-plugins/logstash-input-beats/issues/364](https://github.com/logstash-plugins/logstash-input-beats/issues/364)

---

<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:** [July 19, 2019, 1:50pm UTC](https://discuss.elastic.co/t/beats-input-plugin-cannot-read-password-protected-ssl-key/186771/4 "2019-07-19T13:50:05Z")

</div>

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