Get List of Listening Ports (Linux)

To see a list of listening ports on a host you can run:

sudo ss -tunlp

You can also filter with the below, in this example filtering to port 22 (SSH):

sudo ss -tlnp sport = :22

Leave a comment