1. 先安装tcl
进入tcl解压目录,然后进入unix目录
#./configure
#make
#make install
2. 后安装expect
进入expect解压目录,红色字符为当前目录
#./configure --with-tclinclude=/app/tcl8.4.19/generic/ --with-tclconfig=/usr/local/lib/
#make
#make install
3.使用export脚本展开对其他主机的ssh访问
脚本详情见连接:
https://github.com/Yangzhoufly/shell/tree/master/su_shell
4.被访问的主机会留下登录日志
ubuntu系统:/var/log/auth.log
centos系统:/var/log/secure
我们在对auth.log日志进行分析时发现,它似乎是一分钟才更新一次内容,这给我们的实时分析带来了一些困难,尚待解决。