|
[root@xavi sbin]# sh -x exe.sh ++ cat ip.list
+ for ip in '`cat ip.list`'
+ echo 116.62.xxx.xxx
116.62.xxx.xxx
+ ./exe.expect 116.62.xxx.xxx 'w;free -m;ls /tmp'
spawn ssh root@116.62.xxx.xxx
root@116.62.xxx.xxx's password:
Last login: Tue May 1 09:06:02 2018 from 117.80.xxx.xxx
Welcome to Alibaba Cloud Elastic Compute Service !
[root@xaviyunserver ~]# w;free -m;ls /tmp
10:42:43 up 2:44, 3 users, load average: 0.00, 0.01, 0.05
USER TTY FROM LOGIN@ > root pts/0 117.60.xxx.xxx 08:01 2:01m 0.00s 0.00s -bash
root pts/1 117.80.xxx.xxx 09:06 13:47 0.00s 0.00s -bash
root pts/2 117.80.xxx.xxx 10:42 0.00s 0.00s 0.00s w
total used free shared buff/cache available
Mem: 1839 63 1403 0 372 1628
Swap: 0 0 0
12.txt
Aegis-
systemd-private-791e0c77625c4133bda4340fcd191439-ntpd.service-mZ3IQT
[root@xaviyunserver ~]# + for ip in '`cat ip.list`'
+ echo 127.0.0.1
127.0.0.1
+ ./exe.expect 127.0.0.1 'w;free -m;ls /tmp'
spawn ssh root@127.0.0.1
root@127.0.0.1's password:
Last failed login: Tue May 1 10:01:00 CST 2018 from localhost on ssh:notty
There were 2 failed login attempts since the last successful login.
Last login: Tue May 1 09:06:00 2018 from 192.168.72.1
[root@xavi ~]# w;free -m;ls /tmp
10:42:43 up 7:26, 3 users, load average: 0.00, 0.01, 0.05
USER TTY FROM LOGIN@ > root pts/0 192.168.72.1 07:52 1:59m 0.44s 0.44s -bash
root pts/1 192.168.72.1 09:06 3.00s 2.19s 0.01s /usr/bin/expect ./exe.expect 127.0.0.1 w;
root pts/3 localhost 10:42 0.00s 0.04s 0.00s w
total used free shared buff/cache available
Mem: 1823 243 1114 17 465 1364
Swap: 3813 0 3813
12.txt
ip.list
list.txt
php-fcgi.sock
systemd-private-59132022d890457896ed0047dcd941fe-cups.service-rfy8W2
systemd-private-59132022d890457896ed0047dcd941fe-httpd.service-h5dZDM
systemd-private-59132022d890457896ed0047dcd941fe-vmtoolsd.service-iZ3m2r
tmp
xavier.sock
|
|
|