A simple background shell script that watches for ssh activities and alerts you via xmessage.
Activities includes: ssh login, logout and failed login attemps.
Ssh watcher simply watches your /var/log/auth.log
.
It's desined and tested on raspberry pi, but may be able to run on other os's.
You can also make this automatically run on start up,
for raspberry pi.
Just put the ssh-watcher-gui-vX.X.sh
in whatever directory you like, probability best in you home directory,
then run it! ./ssh-watcher-gui-vX.X.sh
If you don't want your terminal to be busy running it, then do ./ssh-watcher-gui-vX.X.sh &
.
Put the ssh-watcher-cli-vX.X.sh
in your home directory, or whatever you like.
To run it, you can do ./ssh-watcher-cli-vX.X.sh
, and you can do ./ssh-watcher-cli-vX.X.sh -h
for more options.
There are two difrent scripts, the ssh-watcher-gui-vX.X.sh
if for raspberry pi's with a GUI and display,
and the ssh-watcher-cli-vX.X.sh
is for raspberry pi's without a GUI or display.
Note: the gui script alerts via xmessage, and the cli script alerts thrught the terminal thats running it.
open a terminal and type:
vim ~/.bashrc
then at the top, or the bottom, write:
./ssh-watcher.sh &> /dev/null &
save and exit then you done!
Make sure you script is in your home directory, or include a path to it.
this should work for the latest version of Raspbian.
note: You can find older versions in the previous-versions
folder.
now watches for failed login attemps
name change and better layout
initial release