fstat might help you here. In OpenBSD,
Code:
fstat | grep ':22' | awk '{print $3}' | uniq
This will search the fstat output for port 22, and then awk will give you the third column which is the PID for the process bound to the specified port. Replace 22 with whatever port number you are binding to (don't forget to leave in the colon symbol) and you should get the info you need. Column output and command line switches might be different! =)
Nick