Skip to content

GwendolynK-zz/ssh-watcher

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

What is ssh-watcher:

A simple background shell script that watches for ssh activities and alerts you via xmessage.
Activities includes: ssh login, logout, and failed login attemps.


How it works:

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 OSs.

You can also make this automatically run on start up for raspberry pi.

How to install and use the gui script:

Just put the ssh-watcher-gui-vX.X.sh in whichever directory you like, probably best in your home directory,
and 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 &.

How to install and use the cli script:

Put the ssh-watcher-cli-vX.X.sh in your home directory, or wherever 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.

Cli vs Gui:

There are two difrent scripts, the ssh-watcher-gui-vX.X.sh if for a raspberry pi with a GUI and display,
and the ssh-watcher-cli-vX.X.sh is for a raspberry pi without a GUI or display.

Note: the gui script alerts via xmessage, and the cli script alerts thrught the terminal that's running it.

To make it run on boot or startup for raspberry pi:

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.

ChangeLog:

--version-1.2-- May 18, 2018

now watches for failed login attemps

--version-1.1-- May 16, 2018

name change and better layout

--version-1.0-- May 11, 2018

initial release

End ChangeLog


About

watches and monitors ssh login

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Shell 100.0%