Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Show which processes are listening to which ports' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Show which processes are listening to which ports
Authored by: argh128 on Apr 26, '07 08:11:41AM

I had high hopes for this as a general tool to see what daemons are running... but it looks incomplete.

For example on my system it lists the following:
ARDAgent
AppleVNC
SubethaEdit

but not SSHD, or any other services (SMB, WEB, etc)... Am I missing a reason why these services are not showing up?



---

A completely SANE Canadian.



[ Reply to This | # ]
Show which processes are listening to which ports
Authored by: doctype on Apr 26, '07 08:16:17AM
To see all processes, prepend sudo:

sudo lsof -i | grep LISTEN

[ Reply to This | # ]
Show which processes are listening to which ports
Authored by: doctype on Apr 26, '07 08:18:34AM

... and btw, ssh is managed by launchd, so you will only see sshd in the list if there is a current session (somebody is currently logged in)



[ Reply to This | # ]
Not true
Authored by: kholburn on Apr 27, '07 10:30:57AM
If you have ssh enabled you will see something like this:

launchd       1 root    9u  IPv6 0x386dc50      0t0  TCP *:ssh (LISTEN)
launchd       1 root   10u  IPv4 0x3d85e08      0t0  TCP *:ssh (LISTEN)
The ssh port has to have something listening on it if you are able to log in.

hmmm.... I have IPv6 configured to be off so why is launchd also listening on an IPv6 port? That's not good.

[ Reply to This | # ]
Show which processes are listening to which ports
Authored by: argh128 on Apr 26, '07 10:15:19AM

Good point.

And really, when not run as root this would be almost useless to find "trojans" (Assuming that it was able to in the first place)

---

A completely SANE Canadian.



[ Reply to This | # ]