• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

contrib/H04-Apr-2018-306230

daemon/H04-Apr-2018-192156

vendor/H03-May-2022-175,118147,011

.gitignoreH A D04-Apr-2018188 1410

LICENSEH A D04-Apr-20181 KiB2217

MakefileH A D04-Apr-2018306 2215

README.mdH A D04-Apr-20181.2 KiB3021

hare.cH A D04-Apr-20182.3 KiB10275

json.cH A D04-Apr-201829.3 KiB1,4131,046

json.hH A D04-Apr-20183.6 KiB12558

README.md

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