How to check if port 22 is open in Linux Run the ss command and it will display output if port 22 opened: sudo ss -tulpn | grep :22. Another option is to use the netstat: sudo netstat -tulpn | grep :22. We can also use the lsof command to see if ssh port 22 status: sudo lsof -i:22. Sep 21, 2020