Get SSH Login Event - Get Notification when "User" Logsin to OpenHab

I am trying to find a way to get the event when a “User”/Root/“openhab” logs into OpenHab via SSH/Console.
My goal is to play a sound or some other action whenever I enter OpenHab via SSH.
Like the good old “Link Engaged” Teamspeak voice.
Also, it would really be Interesting for Security reasons, to see or get notified whenever there is an attempt to Login to the Openhab system.

So far I tried so check events log via http://openhabianpi:9001/ but I did not see any Logs.

Platform information:
Rpi3 with Openhabian

The ssh login event occur at core level and openHAB will not see these.
You get a script to run everytime there is an ssh login

and in the script do a call to teh rest api to trigger a rule

1 Like

Awesome! Thats what i needed to Know! Thanks.

But Unfortunately :smiley: This crashed my Entire Set Up… :smiley: And I had no Back Up :smiley: (But i wantet to reset everything up anyway and was just looking for a reason… so thanks)
I could not Log in to SSH enymore… I followed the example on the post
(ForceCommand /usr/bin/ownscript) an i got:
–> “No such file or directory in /usr/bin/ownscript”

how to i have to set the path with open hub?

If linux tell you the the file is not there, check it is there first of all.

cd /usr/bin