[root@centos7 ~]#netstat -t | grep ':ssh'|tr -s ' '|cut -d ' ' -f5|cut -d: -f1 | uniq -c|sort -rn
2 192.168.37.1
1 192.168.37.102
1 192.168.37.100
统计当前连接本机的每个远程主机IP的连接数,并按从大到小排序
最新推荐文章于 2021-02-20 16:35:42 发布
[root@centos7 ~]#netstat -t | grep ':ssh'|tr -s ' '|cut -d ' ' -f5|cut -d: -f1 | uniq -c|sort -rn
2 192.168.37.1
1 192.168.37.102
1 192.168.37.100