Browse Source

add login message after ssh login

python3
Edoardo Putti 6 years ago
parent
commit
15aa44e5b6
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      roles/ssh_server/files/last_ssh_login

+ 7
- 0
roles/ssh_server/files/last_ssh_login View File

@ -0,0 +1,7 @@
#! /usr/bin/env bash
LOGINS=5
echo ""
echo "Last $LOGINS SSH accepted logins"
grep Accepted /var/log/auth.log | tail -n $LOGINS | cut -f 1,2,3,11,15,16,17,18,19,20,21,22 -d " "

Loading…
Cancel
Save