From a bash script how can I quickly find out whether a port 445 is open/listening on a server.
I have tried a couple of options, but I want something q
tcping is a great tool with a very low overhead.It also has a timeout argument to make it quicker:
[root@centos_f831dfb3 ~]# tcping 10.86.151.175 22 -t 1
10.86.151.175 port 22 open.
[root@centos_f831dfb3 ~]# tcping 10.86.150.194 22 -t 1
10.86.150.194 port 22 user timeout.
[root@centos_f831dfb3 ~]# tcping 1.1.1.1 22 -t 1
1.1.1.1 port 22 closed.