Prerequisites
Before checking port usage, make sure you have:
- SSH access to your VPS
- Root or sudo privileges (to see all processes)
Method 1: Using netstat
Connect to your VPS:
ssh hxroot@YOUR_SERVER_IP -p 22
Check specific port:
sudo netstat -tulpn | grep :80
Output shows process name/PID.
Method 2: Using ss
sudo ss -tulpn | grep :443
Method 3: Using lsof
sudo lsof -i :22
Method 4: Using fuser
sudo fuser 80/tcp
✅ You can now identify which service is using any port.