# vi /etc/ssh/sshrc
#! /bin/bash echo -e "USER:$USER\nFROM:$SSH_CLIENT\nDATE:`date`" | mail -s "SSH Notice! $HOSTNAME" root
届いたメールの内容 ———————-
件名:SSH Notice! web1.example.net
本文:
USER:hogeuser
FROM:118.xxx.yyy.126 62470 xxx22
DATE:Fri Jun 16 14:25:59 JST 2017
ログイン文字の装飾
@see http://www.patorjk.com/software/taag/
# vi /etc/motd _ _ __ ___ __ _____| |__ / | / _\ / _ \ \ \ /\ / / _ \ '_ \| | \ \ / /_\/ \ V V / __/ |_) | |__\ \/ /_\\ \_/\_/ \___|_.__/|_(_)__/\____/ |`-._/\_.-`| | || | |___o()o___| |__((SG))__| \ o\/o / \ || / \ || / '.||.' `` ---------------------------------------------------------------------- I recorded the login and mailed it to the administrator. ----------------------------------------------------------------------