生产系统大多不允许root登录,但是对于每次查找密码文件总是觉得很烦,xshell工具可以使用如下脚本,进行root密码验证。
Sub Main
xsh.Screen.Send "su - root"xsh.Screen.Send VbCr
xsh.Screen.WaitForString "Password:"
xsh.Screen.Send "ur password"
xsh.Screen.Send VbCrEnd Sub
另外此脚本还可以作为一些监控命令来用,打开连接直接看到监控日志。很方便