On my Linux machine, I have services enabled for SSH. However, whenever /usr/sbin/sshd is init, it fails to daemonize. No sshd.pid file is generated under /var/run and sshd is not running when I do a 'ps'.
The strange thing is that when I run sshd in non-daemon mode (ie. '/usr/sbin/sshd -D') or if I run it in debug mode (ie. 'usr/sbin/sshd -d'), sshd is able to run and sshd.pid file is generated under /var/run.
I've also verified that default port 22 is available and not being used by another process. Also, when I try different ports, I observe the same behavior detailed above.
Any idea why this might be happening?
Thanks