1

I'm trying to free up port 22 for a docker container (that I'll have to run in another port mapping).

I'm running

netstat -a | grep 22

One of the results I'm getting is:

kctl       0      0     22      9 com.apple.netsrc

My question is: What is kctl running on port 22 on a mac?

2

"kctl" means that is a kernel control socket, not a network socket. This is a separate socket domain for local communication with kernel extensions (see Apple's developer documentation). Here's a partial display from my computer:

$ netstat -an | grep -B2 kctl | head
Active kernel control sockets
Proto Recv-Q Send-Q   unit     id name
kctl       0      0      1      2 com.apple.nke.sockwall
kctl       0      0      1      5 com.apple.net.necp_control
kctl       0      0      2      5 com.apple.net.necp_control
kctl       0      0      3      5 com.apple.net.necp_control
kctl       0      0      1      6 com.apple.net.netagent
kctl       0      0      2      6 com.apple.net.netagent
kctl       0      0      3      6 com.apple.net.netagent
kctl       0      0      4      6 com.apple.net.netagent

Summary: ignore it, it's not relevant to what you're trying to do.

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.