一、使用脚本批量Telnet测试端口是否连通
在一些情况下,我们无法安装nc,ansible等工具,所以一些批量操作,我们只能使用shell实现。下面分享一个近期工作中使用到的批量Telnet端口的脚本,希望对大家能够帮助:
二、telnet脚本
[root@k8s-m-01 ~]# ll
-rw-r--r-- 1 root root 226 Jul 11 10:35 ip_info
-rw-r--r-- 1 root root 253 Jul 11 10:35 result.log
-rw-r--r-- 1 root root 495