Using inittab to ensure sshd (and other important items) are still running -- any drawbacks?

Solution 1:

There's a few implementations of this idea. Upstart is used by Ubuntu and can restart services if they die, Solaris 10 has the Service Management Facility, runit is cross-platform and there's daemontools as already mentioned.

Solution 2:

I can think of no other reason not to do the inittab thing, than that restarting sshd after an upgrade is a little more inconvenient.

Other than that: interesting idea.

Solution 3:

you can tell linux OOM killer not to kill sshd, google for oom_adj for more details, or see i.e. here rhel manual