# Pattern for SSH auth not match

**URL:** <https://discuss.elastic.co/t/pattern-for-ssh-auth-not-match/189670>\
**Category:** Logstash\
**Created:** [July 10, 2019, 6:48am UTC](https://discuss.elastic.co/t/pattern-for-ssh-auth-not-match/189670 "2019-07-10T06:48:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave\_Hafid](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dave_hafid/32/48115_2.png) [@Dave\_Hafid](https://discuss.elastic.co/u/Dave_Hafid)\
**Post date:** [July 10, 2019, 6:48am UTC](https://discuss.elastic.co/t/pattern-for-ssh-auth-not-match/189670/1 "2019-07-10T06:48:53Z")

</div>

Dear ALL,

i facing some issue when try to create pattern for ssh auth from file /var/log/secure  
this is line i want to create pattern,  
`Jul 8 18:43:05 masternode sshd[18144]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=172.1.1.1 user=abc`

and this is pattern i create using grok debugger,  
`%{SYSLOGTIMESTAMP:timestamp} %{HOSTNAME:hostname} sshd(?:\[%{NUMBER:pid}\])?: pam_unix\(sshd:auth\): authentication failure; logname=%{DATA:logname} uid=%{NUMBER:uid} euid=%{NUMBER:euid} tty=%{PROG:tty} ruser=%{DATA:ruser} rhost=%{IPORHOST:rhost}`

and how to create file pattern for grok..?

the last line user not match for grok any help really appreciated.

its working now.

i have another question for what add\_field and add\_tag ...?  
this mean add filed in kibana or what..?

need advice.  
Thanks

---

<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:** [August 7, 2019, 6:48am UTC](https://discuss.elastic.co/t/pattern-for-ssh-auth-not-match/189670/2 "2019-08-07T06:48:58Z")

</div>

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