1,创建工作目录mkdir /usr/local/proxy/
vi proxy
#!/bin/bash
Tmpfile=`mktemp`
User=$USER
Ip=${SSH_CLIENT%% *}
Date="`date +%Y-%m-%d`"
Logfile="/var/log/myaudit/${Date}_${User}_$Ip.log"
exec /usr/bin/script -a -f -q $Logfile
2 修改/etc/profile
vi /etc/profile
/usr/local/proxy/proxy
3,
tail -f /var/log/myaudit/
本文出自 “我是一只小小鸟” 博客,请务必保留此出处http://2242558.blog.51cto.com/2232558/1545305
原文:http://2242558.blog.51cto.com/2232558/1545305