I am working on setting up something to listen on port 2222 on my host, but was surprised to see that there is already something listening on that port.
What is sshd.pam and why is it listening on this port? I have sshd running as a systemd service, and I tried stopping it just to verify, and yes, sshd only listens to port 22 which is released when the sshd service is stopped.
Any help on what this is and where it comes from is much appreciated. I would like to release this port for my other use, but just killing the pid immediately starts up another instance of whatever this is. Naturally I want to clear this away in a proper manner so that I don’t risk conflicts later.
TLDR; What is running on port 2222 in my case, and how do I properly stop it so that I can run something else on that port?
I found what it was now, I had knockd running in a docker container, and for some reason it was keeping port 2222 open, though nothing was sending the knock sequence. I restarted the container and now port 2222 is released.