Skip to content

bloodhunterd/SSH-Login-Notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSH Login Notification

Release License

The script makes sure that you are notified by email about every user login via SSH.

Deployment

The script ssh-login-notification.sh only needs to be placed under /etc/profile.d/ so that it is executed every time the user logs on via SSH.

Requirements

If not already installed, the dnsutils and mailutils packages are needed to resolve IP to FQDN and send emails. It is assumed that a working MTA like Exim is installed.

Configuration

The script need to be customized. All that is required is to create a file with the name ssh-login-notification.conf.

Please configure the following settings:

Setting Description
MESSAGE A message that describes what happened.
RECEIVER Any valid email address.
SUBJECT A meaningful email subject.

Example

MESSAGE="An SSH login was detected."
RECEIVER="example@example.com"
SUBJECT="SSH Login"

Update

Please note the changelog to check for configuration changes before updating.

Authors

License

This project is licensed under the MIT - see LICENSE.md file for details.

Funding

ko-fi

*[MTA]: Mail Transport Agent *[SSH]: Secure Shell