#!/bin/sh
cip=${SSH_CLIENT%% *}
cuser=$USER
ctime=$(date "+%F %k:%M")
ctty=$SSH_TTY
[ "$cuser" == "root" ]&&echo "$ctty $ctime ($cip)" > /tmp/login
