# SSL/Authentication: logstash -\> logstash

**URL:** <https://discuss.elastic.co/t/ssl-authentication-logstash-logstash/71541>\
**Category:** Logstash\
**Created:** [January 13, 2017, 4:13pm UTC](https://discuss.elastic.co/t/ssl-authentication-logstash-logstash/71541 "2017-01-13T16:13:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maria\_Delarosa](https://avatars.discourse-cdn.com/v4/letter/m/87869e/32.png) [@Maria\_Delarosa](https://discuss.elastic.co/u/Maria_Delarosa)\
**Post date:** [January 13, 2017, 4:13pm UTC](https://discuss.elastic.co/t/ssl-authentication-logstash-logstash/71541/1 "2017-01-13T16:13:09Z")

</div>

I have two servers and each has a logstash instance running. On `Server A`, the apache logs are captured by logstash and sent to `Server B`. I am using the TCP pluging and it is listening/recieving data on `port 5000` on `Server B`. The below configuration works great. However, it is not a secure connection from `Server A` to `Server B`. Any suggestions how to secure communication between two logstash instances?

**Server A**

`bin/logstash agent -f node.conf -l logstash.log`

node.conf

```
input {
        file {
                path => "/logs/apache/*.log"
        }
}
output {
        stdout { codec => rubydebug { metadata => true } }
        tcp {
                codec => "json_lines"
                host => "169.99.9.199"
                port => 5000
        }
}

```

**Server B**

`bin/logstash agent -f central.conf -l logstash.log`

central.conf

```
input {
  tcp {
        port => 5000
        codec => json
  }
}
output {
        stdout { codec => rubydebug { metadata => true } }
        kafka {
                codec => json
                topic_id => "topic_name"
                bootstrap_servers => "servername"
        }
}
```

---

<div class="post-metadata">

**Author:** ![ceekay](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ceekay/32/5687_2.png) [@ceekay](https://discuss.elastic.co/u/ceekay)\
**Post date:** [January 19, 2017, 2:39am UTC](https://discuss.elastic.co/t/ssl-authentication-logstash-logstash/71541/2 "2017-01-19T02:39:07Z")

</div>

Have a look at the lumberjack input/output plugins: [https://www.elastic.co/guide/en/logstash/current/plugins-outputs-lumberjack.html](https://www.elastic.co/guide/en/logstash/current/plugins-outputs-lumberjack.html)

Alternatively you can use Filebeat in place of Logstash on the sending server. If all you're doing is reading and sending files then Logstash is a bit of overkill.

---

<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 16, 2017, 2:39am UTC](https://discuss.elastic.co/t/ssl-authentication-logstash-logstash/71541/3 "2017-02-16T02:39:11Z")

</div>

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