# Could not recognize 'ssl\_key' format

**URL:** <https://discuss.elastic.co/t/could-not-recognize-ssl-key-format/166163>\
**Category:** Logstash\
**Created:** [January 29, 2019, 12:44pm UTC](https://discuss.elastic.co/t/could-not-recognize-ssl-key-format/166163 "2019-01-29T12:44:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lyubava](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@lyubava](https://discuss.elastic.co/u/lyubava)\
**Post date:** [January 29, 2019, 12:44pm UTC](https://discuss.elastic.co/t/could-not-recognize-ssl-key-format/166163/1 "2019-01-29T12:44:47Z")

</div>

Hi,  
I'm trying to implement SSL in TCP input.  
And I have error:

```auto
"Could not recognize 'ssl_key' format. Class: Java::OrgBouncycastleCert::X509CertificateHolder", :thread=>"#<Thread:0x7d70517e run>"

```

There is part of my conf file.

```auto
input {
   tcp {
    port => 5044
    mode => "server"
    ssl_enable => true
    ssl_cert => "/etc/logstash/root-ca.pem"
    ssl_extra_chain_certs => "/etc/logstash/root-ca.pem"
    ssl_key => "/etc/logstash/root-ca.pem"
    ssl_verify => true
  }
}

```

I have no idea what is wrong.  
I found the same topic ([TCP input plugin](https://discuss.elastic.co/t/tcp-input-plugin/158016)).  
And I use logstash version 6.5.4 too.  
Maybe it is bug in this version?  
I will be glad to any advice.

---

<div class="post-metadata">

**Author:** ![lyubava](https://avatars.discourse-cdn.com/v4/letter/l/dc4da7/32.png) [@lyubava](https://discuss.elastic.co/u/lyubava)\
**Post date:** [January 29, 2019, 1:16pm UTC](https://discuss.elastic.co/t/could-not-recognize-ssl-key-format/166163/2 "2019-01-29T13:16:05Z")

</div>

Oh, I just use wrong type of file n ssl\_key. I have to use

```auto
ssl_key => "/etc/pki/tls/private/logstash-forwarder.key"

```

Topic from link confused me 🙂

---

<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:** [February 26, 2019, 1:16pm UTC](https://discuss.elastic.co/t/could-not-recognize-ssl-key-format/166163/3 "2019-02-26T13:16:09Z")

</div>

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