Default Listening Ports in Linux
Emily Wong
Are there any default listening ports in Linux, like 135 and 445 for directory services in Windows?
While searching for a remote machine, I need to identify whether the machine I am connecting to is Linux or not, to perform some scripting operations based on OS.
I can't use tool like NMap, Since my application is a commercial one and Source code should be a closed one.
72 Answers
Linux has no default "signature" ports, since many of the ports that it uses are not unique to it.
The most common listening port on linux systems is port 22 (used for ssh).
You can check for other open ports by calling lsof -i (as root) on the linux machine.
Also an answer to a similar question (which was solved by using nmap) suggests, that you could find out the operating system using only the ping command.