安装hping
一 安装hping步骤
mkdir -p /usr/local/hping && cd /usr/local/hping wget https://github.com/antirez/hping/archive/master.zip && unzip master.zip && cd hping-master yum install -y libpcap-devel yum install -y gcc gcc-c++ yum install -y tcl tcl-devel mkdir -p /usr/local/man/man8 ./configure && make strip && make install
二 使用hping探测tcp端口是否打开
hping -S x.x.x.x -p 22