Generate SSL Certs for Filebeat->Logstash

I need to establish an SSL connection b/w my logstash and filebeat.

To generate Cert I reffered ESCertUtil

But it is confusing..

To create CA (as zip), I did bin/elasticsearch-certutil ca --pem
then I unzipped it using unzip as ca.crt and ca.key .. It have not asked for any password.

soon after, to generate server cert and key , I did bin/elasticsearch-certutil cert --ca elastic-stack-ca.p12

It promted me for CA password and I entered it. It spits out the following error:

Exception in thread "main" java.nio.file.NoSuchFileException: elastic-stack-ca.p12
        at sun.nio.fs.UnixException.translateToIOException(
        at sun.nio.fs.UnixException.rethrowAsIOException(
        at sun.nio.fs.UnixException.rethrowAsIOException(
        at sun.nio.fs.UnixFileSystemProvider.newByteChannel(
        at java.nio.file.Files.newByteChannel(
        at java.nio.file.Files.newByteChannel(
        at java.nio.file.spi.FileSystemProvider.newInputStream(
        at java.nio.file.Files.newInputStream(
        at org.elasticsearch.xpack.core.ssl.CertParsingUtils.readKeyStore(
        at org.elasticsearch.xpack.core.ssl.CertParsingUtils.readPkcs12KeyPairs(
        at org.elasticsearch.cli.EnvironmentAwareCommand.execute(
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
        at org.elasticsearch.cli.MultiCommand.execute(
        at org.elasticsearch.cli.Command.mainWithoutErrorHandling(
        at org.elasticsearch.cli.Command.main(
[root@hc4t05745 elasticsearch-6.4.2]# bin/elasticsearch-certutil cert --ca
Simplifies certificate creation for use with the Elastic Stack

For me the process is pretty confusing, can anyone explain me the clear steps with example and not with any elastic links ( I have searched many but confused, thats why) .. Thanks in advance !

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