-
SSH Key Login Alert, with key specific Bash History & Telegram Alert
-
Create a Telegram bot using Botfather (https://telegram.me/BotFather)
-
Change the variables for the "telegramGroupID" & "botToken" in the "sshLoginExtended.sh" file
-
Put the "sshLoginExtended.sh" script in /etc/profile.d/sshLoginExtened.sh
-
Its recogmended that you disable password logins as this will defeat
-
the purpoise of this script since it will be bypassed if a non-key login is used.
-
To do that edit "/etc/ssh/sshd_config" and modify the below options as below
- ChallengeResponseAuthentication no
- PasswordAuthentication no
-
To get this to work on CentOS 5 you will need to edit the /etc/bashrc
-
above the
case $TERM in
insertif [ -z "$PROMPT_COMMAND" ]; then
-
and below the
esac
insertfi