<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic sshd transactions in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/sshd-transactions/m-p/219909#M188068</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am playing with secure.log entries for sshd and am able to find transactions based on pid from below;&lt;/P&gt;

&lt;P&gt;Sep 12 13:15:41 www sshd[&lt;STRONG&gt;19475&lt;/STRONG&gt;]: Accepted password for root from a.b.c.d port 53966 ssh2&lt;BR /&gt;
Sep 12 13:15:45 www sshd[&lt;STRONG&gt;19475&lt;/STRONG&gt;]: Received disconnect from a.b.c.d: 11: disconnected by user&lt;/P&gt;

&lt;P&gt;index=secure | transaction pid startswith="Accepted" endswith=" by user"&lt;/P&gt;

&lt;P&gt;However for non root users a child process is spawned and a transaction looks like this;&lt;/P&gt;

&lt;P&gt;Sep 12 13:16:03 www sshd[&lt;STRONG&gt;19502&lt;/STRONG&gt;]: Accepted password for user from a.b.c.d port 53967 ssh2&lt;BR /&gt;
Sep 12 13:16:03 www sshd[&lt;STRONG&gt;19502&lt;/STRONG&gt;]: User child is on pid &lt;STRONG&gt;19508&lt;/STRONG&gt;&lt;BR /&gt;
Sep 12 13:16:09 www sshd[&lt;STRONG&gt;19508&lt;/STRONG&gt;]: Received disconnect from a.b.c.d: 11: disconnected by user&lt;/P&gt;

&lt;P&gt;Now the whole pid thing breaks down and I am not sure how to create a transaction for this case, let alone  a search command that can deal with both cases.&lt;/P&gt;

&lt;P&gt;Any pointers are highly appreciated.&lt;/P&gt;</description>
    <pubDate>Sat, 12 Sep 2015 12:44:53 GMT</pubDate>
    <dc:creator>brahimmouhdi</dc:creator>
    <dc:date>2015-09-12T12:44:53Z</dc:date>
    <item>
      <title>sshd transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sshd-transactions/m-p/219909#M188068</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I am playing with secure.log entries for sshd and am able to find transactions based on pid from below;&lt;/P&gt;

&lt;P&gt;Sep 12 13:15:41 www sshd[&lt;STRONG&gt;19475&lt;/STRONG&gt;]: Accepted password for root from a.b.c.d port 53966 ssh2&lt;BR /&gt;
Sep 12 13:15:45 www sshd[&lt;STRONG&gt;19475&lt;/STRONG&gt;]: Received disconnect from a.b.c.d: 11: disconnected by user&lt;/P&gt;

&lt;P&gt;index=secure | transaction pid startswith="Accepted" endswith=" by user"&lt;/P&gt;

&lt;P&gt;However for non root users a child process is spawned and a transaction looks like this;&lt;/P&gt;

&lt;P&gt;Sep 12 13:16:03 www sshd[&lt;STRONG&gt;19502&lt;/STRONG&gt;]: Accepted password for user from a.b.c.d port 53967 ssh2&lt;BR /&gt;
Sep 12 13:16:03 www sshd[&lt;STRONG&gt;19502&lt;/STRONG&gt;]: User child is on pid &lt;STRONG&gt;19508&lt;/STRONG&gt;&lt;BR /&gt;
Sep 12 13:16:09 www sshd[&lt;STRONG&gt;19508&lt;/STRONG&gt;]: Received disconnect from a.b.c.d: 11: disconnected by user&lt;/P&gt;

&lt;P&gt;Now the whole pid thing breaks down and I am not sure how to create a transaction for this case, let alone  a search command that can deal with both cases.&lt;/P&gt;

&lt;P&gt;Any pointers are highly appreciated.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Sep 2015 12:44:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sshd-transactions/m-p/219909#M188068</guid>
      <dc:creator>brahimmouhdi</dc:creator>
      <dc:date>2015-09-12T12:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: sshd transactions</title>
      <link>https://community.splunk.com/t5/Splunk-Search/sshd-transactions/m-p/219910#M188069</link>
      <description>&lt;P&gt;So, I have something working but it is not pretty;&lt;/P&gt;

&lt;P&gt;first I extract a field called cpid from "Sep 12 13:16:03 www sshd[19502]: User child is on pid &lt;STRONG&gt;19508&lt;/STRONG&gt;"  type rows.&lt;/P&gt;

&lt;P&gt;Then use rename to overwrite the pid field with the cpid value and the transactions work for both root and  non root users :).&lt;/P&gt;

&lt;P&gt;index=secure "by user" OR "Accepted" OR "child" | rename cpid as pid | transaction pid startswith="Accepted" endswith="by user"&lt;/P&gt;

&lt;P&gt;So, it works but I would still appreciate a  cleaner solution?&lt;/P&gt;</description>
      <pubDate>Sat, 12 Sep 2015 18:25:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/sshd-transactions/m-p/219910#M188069</guid>
      <dc:creator>brahimmouhdi</dc:creator>
      <dc:date>2015-09-12T18:25:05Z</dc:date>
    </item>
  </channel>
</rss>

