Originally posted by: ostost
You can try netstat and kdb to find out the process.
First use netstat -Aan to display the process control block of the socket. Below an example which shows that the process on port 22 is sshd.
# netstat -Aan
[...]
f100060000cfd398 tcp4 0 0 *.22
. LISTEN
[...]
Then use kdb to find the process
# echo "sockinfo
f100060000cfd398 tcpcb" | kdb |grep proc
F100070F00000000 F100070F10000000 pvproc+000000
proc/fd: 101/3
proc/fd: fd: 3
pvproc+019400 101*sshd ACTIVE 00650EA 003008C 00000001E02FF480 0 0001