how to know what application is using a port code example
Example 1: ubuntu check process on port
sudo lsof -i:22
Example 2: how to check listening ports on a server
sudo ss -tulwn | grep LISTEN
sudo lsof -i:22
sudo ss -tulwn | grep LISTEN