Send pushbullet notifications to your phone when someone logs in your server.
-
clone this repo
-
Install the requirements
$ pip install -r requirements.txt
-
Create a file called
token
containing your pushbullet API key. -
Change the folders in the service file.
-
Then just copy the service to correct place
$ cp ssh_alert.service /lib/systemd/system/ $ sudo systemctl enable ssh_alert.service $ sudo systemctl start ssh_alert.service
-
Check if it hasn't crashed
$ systemctl status ssh_alert.service
Then ssh to your server (or sudo) and you should get a pushbullet notification.
That's all.
-
It uses the wonderfull package pushbullet.py
-
Inspiration (and part of code) comes from groovemonkey: ssh_alert
-
Check his videos : tutorial linux