Anyone please help on create keys/certs for filebeat 5 to logstash?

The doc ( )did not say which way to create these keys/certificates, I tried to create with openssl two-way SSL but does not work, error is:
[2016-12-07T14:25:01,198][ERROR][ ] Looks like you either have an invalid key or your private key was not in PKCS8 format. {:exception=>java.lang.IllegalArgumentException: File does not contain valid private key: /etc/logstash/logstash.key}

hosts: [""]
ssl.certificate_authorities: ["/etc/ca.crt"]
ssl.certificate: "/etc/client.crt"
ssl.key: "/etc/client.key"

input {
beats {
port => 5044
ssl => true
ssl_certificate_authorities => ["/etc/ca.crt"]
ssl_certificate => "/etc/server.crt"
ssl_key => "/etc/server.key"
ssl_verify_mode => "force_peer"

Please give me a full list of commands or a guide which works.

I've always been able to use an adaptation of what's in

openssl req -x509  -batch -nodes -newkey rsa:2048 -keyout lumberjack.key -out lumberjack.crt -subj /

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