1# hared-hare 2 3This is the C program (`hare`) and the Python daemon (`hared`) for [this story](https://jpmens.net/2018/03/25/alerting-on-ssh-logins/). 4 5_hare_ is a small utility which is installed in a PAM configuration (e.g. for `sshd`) in order to log when a successful login is attempted, e.g. to alert on machines which are seldom visited or otherwise monitored. 6 7_hare_ transmits a JSON string over a UDP datagram. The JSON looks like this: 8 9```json 10{ 11 "tty": "tty1", 12 "service": "login", 13 "hostname": "zabb01", 14 "user": "jjolie", 15 "tst": 1522154553, 16 "rhost": "<unknown>", 17 "remote" : "10.0.12.1" 18} 19``` 20 21The values for `user`, `rhost`, `tty`, and `service` are set from PAM from their `PAM_` equivalents, and `hostname` will contain the _gethostname(3)_ result as determined by _hare_. `remote` is the IP address of the _hare_ client as seen by _hared_. 22 23Python `hared` is also installable via [https://pypi.python.org/pypi/hared/](https://pypi.python.org/pypi/hared/) 24 25## More 26 27* [hare](https://svnweb.freebsd.org/ports/head/sysutils/hare/) for FreeBSD 28* [hared](https://svnweb.freebsd.org/ports/head/sysutils/hared/) for FreeBSD 29* [py-hared](https://svnweb.freebsd.org/ports/head/sysutils/py-hared/) for FreeBSD 30