# My Local machine does not recognize the elasticsearch certificate

**URL:** https://discuss.elastic.co/t/my-local-machine-does-not-recognize-the-elasticsearch-certificate/374458
**Category:** Elasticsearch
**Tags:** docker
**Created:** [February 12, 2025, 8:35pm UTC](https://discuss.elastic.co/t/my-local-machine-does-not-recognize-the-elasticsearch-certificate/374458 "2025-02-12T20:35:02Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jeanne1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeanne1/32/141332_2.png) [@jeanne1](https://discuss.elastic.co/u/jeanne1)
#### Post date: [February 12, 2025, 8:35pm UTC](https://discuss.elastic.co/t/my-local-machine-does-not-recognize-the-elasticsearch-certificate/374458/1 "2025-02-12T20:35:02Z")

</div>

I setup an elasticsearch cluster on EC2 via docker.  
on EC2 terminal everything working well when I run:

```auto
curl --cacert http_ca.crt -u elastic:$Password https://localhost:9200

```

I got: `{ "name" : "21frt45422121f", "cluster_name" : "docker-cluster", "cluster_uuid" : "xxxxx,...}`

I want to connect from my local machine: I copy the certificate `http_ca.crt` to my local ubuntu machine and I added it in `/usr/local/share/ca-certificates/http_ca.crt`

`curl --verbose --cacert /usr/local/share/ca-certificates/http_ca.crt -u elastic:$Password https://Public-IP-address:9200`

I got this error: **curl: (60) SSL certificate problem: unable to get local issuer certificate** I try to skip the certificate with `-k` option but still getting an error.  
Is there a way to launch the docker container without any certificate ?  
How to get it work. Note that I am connecting via a VPN from my local machine

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [February 13, 2025, 1:42am UTC](https://discuss.elastic.co/t/my-local-machine-does-not-recognize-the-elasticsearch-certificate/374458/2 "2025-02-13T01:42:50Z")

</div>

> [@jeanne1](#):
>
> try to skip the certificate with `-k` option but still getting an error

What error do you get in that case?

---

<div class="post-metadata">

### Author: ![jeanne1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeanne1/32/141332_2.png) [@jeanne1](https://discuss.elastic.co/u/jeanne1)
#### Post date: [February 13, 2025, 3:18pm UTC](https://discuss.elastic.co/t/my-local-machine-does-not-recognize-the-elasticsearch-certificate/374458/3 "2025-02-13T15:18:17Z")

</div>

@TimV I got this error:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2b86a5f047b3997a8e29f921e8ab229d7c750f3e.png)

It is clear that this from my VPN but it is weird as I can connect to that EC2 using the same VPN.
