TCP connections that are currently listening
ss -lt
- use
u
for UDP anda
for all connections even RAW, UNIX sockets
Watch statistics of total system connection
watch ss -s
Specify IPv4 or v6
ss -46
Whether SSH port is listening
ss -at '( dport = :22 or sport = :22 )'