For When You Can't Have The Real Thing
[ start | index | login ]
start > Linux > What Program Has This Port Open

What Program Has This Port Open

Created by dave. Last edited by dave, 9 years and 256 days ago. Viewed 3,194 times. #1
[edit] [rdf]
labels
attachments

How do I associate an open port with a running program?

eg: what is listening on port 22?

# lsof -i :22
COMMAND   PID USER   FD   TYPE    DEVICE SIZE NODE NAME
sshd     1318 root    3u  IPv4      2444       TCP *:ssh (LISTEN)
sshd     7665 root    4u  IPv4 166534123       TCP netbackup:ssh->router:918 (ESTABLISHED)
sshd    19710 root    4u  IPv4 554877146       TCP netbackup:ssh->router:853 (ESTABLISHED)

eg: what is listening on port smpt (the mail port)?

# lsof -i :smtp
COMMAND    PID USER   FD   TYPE   DEVICE SIZE NODE NAME
sendmail 25860 root    4u  IPv4 66767220       TCP *:smtp (LISTEN)
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful:


snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt