# How to mention credentials of shield for packetbeat?

**URL:** <https://discuss.elastic.co/t/how-to-mention-credentials-of-shield-for-packetbeat/27885>\
**Category:** Beats\
**Created:** [August 22, 2015, 8:40pm UTC](https://discuss.elastic.co/t/how-to-mention-credentials-of-shield-for-packetbeat/27885 "2015-08-22T20:40:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Akhilesh\_Anb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akhilesh_anb/32/4343_2.png) [@Akhilesh\_Anb](https://discuss.elastic.co/u/Akhilesh_Anb)\
**Post date:** [August 22, 2015, 8:40pm UTC](https://discuss.elastic.co/t/how-to-mention-credentials-of-shield-for-packetbeat/27885/1 "2015-08-22T20:40:20Z")

</div>

I installed shield for authentication purpose. I have created a user. Now im unable to start the service packetbeat.

Can you tell me how to mention credentials in .yml file. or how to start packetbeat service with that shield user credentials.

/etc/init.d/packetbeat start . Its not starting , its giving an error :

```
output.go:64:
 ERR Fail to set _ttl mapping: ES returned an error: 401 Unauthorized publish.go:232: ERR Fail to initialize elasticsearch plugin as output: ES returned an error: 401 Unauthorized main.go:150: CRIT ES returned an error: 401 Unauthorized ...fail!

```

Help me @tudor

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [August 22, 2015, 11:57pm UTC](https://discuss.elastic.co/t/how-to-mention-credentials-of-shield-for-packetbeat/27885/2 "2015-08-22T23:57:43Z")

</div>

Try setting something like `hosts: ["username/password@localhost:9200"]`.

---

<div class="post-metadata">

**Author:** ![Akhilesh\_Anb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akhilesh_anb/32/4343_2.png) [@Akhilesh\_Anb](https://discuss.elastic.co/u/Akhilesh_Anb)\
**Post date:** [August 23, 2015, 7:43am UTC](https://discuss.elastic.co/t/how-to-mention-credentials-of-shield-for-packetbeat/27885/3 "2015-08-23T07:43:56Z")

</div>

I mentioned that line in .yml. Even though its giving me the same error.

Is there any way to mention credentials? Its very important to me @warkolm . Please help me to start packetbeat with shield credentials. Thanks in advance. 😊

---

<div class="post-metadata">

**Author:** ![tbragin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tbragin/32/45166_2.png) [@tbragin](https://discuss.elastic.co/u/tbragin)\
**Post date:** [August 23, 2015, 2:06pm UTC](https://discuss.elastic.co/t/how-to-mention-credentials-of-shield-for-packetbeat/27885/4 "2015-08-23T14:06:30Z")

</div>

Instructions are here:  
[https://www.elastic.co/guide/en/beats/packetbeat/current/\_using\_https\_and\_basic\_authentication.html](https://www.elastic.co/guide/en/beats/packetbeat/current/_using_https_and_basic_authentication.html)

---

<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:** [July 5, 2017, 9:58pm UTC](https://discuss.elastic.co/t/how-to-mention-credentials-of-shield-for-packetbeat/27885/5 "2017-07-05T21:58:53Z")

</div>


