I did a similar thing a couple of days ago.
I just added this (with the correct values) in the `sshrc` file inside `&#x2F;etc&#x2F;ssh` and enabled a webhook. that&#x27;s it.<p>ip=`echo $SSH_CONNECTION | cut -d &quot; &quot; -f 1`<p>curl -X POST --data-urlencode &#x27;payload={&quot;channel&quot;: &quot;#&lt;your channel&gt;&quot;, &quot;username&quot;: &quot;SSH Login watcher&quot;, &quot;text&quot;: &quot;User &#x27;${USER}&#x27; just logged in from &#x27;${ip}&#x27;&quot;, &quot;icon_emoji&quot;: &quot;:robot_face:&quot;}&#x27; <a href="https:&#x2F;&#x2F;hooks.slack.com&#x2F;services&#x2F;&lt;rest" rel="nofollow">https:&#x2F;&#x2F;hooks.slack.com&#x2F;services&#x2F;&lt;rest</a> of the webhook&gt;