you can also use hpingYou can change the ip address to that of your server. - ping does not use ports.
For a specific port you would need a different command, maybe nmap, then check the output from that.
Code:
[root@amd-nixos:~]# hping2 pi5e -p 22 -SHPING pi5e (br0 10.0.0.91): S set, 40 headers + 0 data byteslen=44 ip=10.0.0.91 ttl=64 DF id=0 sport=22 flags=SA seq=0 win=64240 rtt=1.8 mslen=44 ip=10.0.0.91 ttl=64 DF id=0 sport=22 flags=SA seq=1 win=64240 rtt=2.8 mslen=44 ip=10.0.0.91 ttl=64 DF id=0 sport=22 flags=SA seq=2 win=64240 rtt=1.7 ms^C--- pi5e hping statistic ---3 packets tramitted, 3 packets received, 0% packet lossround-trip min/avg/max = 1.7/2.1/2.8 msthe response of flags=SA means the remote end replied with SYN+ACK, the port is open and ssh is running there
a response with RA means the host is up, but nothing is running on 22, its closed
Statistics: Posted by cleverca22 — Fri Jul 18, 2025 9:52 am