Date: Wed, 23 Sep 2015 09:23:44 -0600 From: Alan Somers <asomers@freebsd.org> To: Doug Hardie <bc979@lafn.org> Cc: FreeBSD Stable ML <stable@freebsd.org> Subject: Re: when the sshd hits the fan Message-ID: <CAOtMX2gUOE%2BM1m=FUKjw6GW8s7TwY5O7sXqZ_aNDcCeXmpaV4w@mail.gmail.com> In-Reply-To: <8CC54339-0028-4CE4-9AAD-2248CD4E2FC9@lafn.org> References: <56026686.8030308@norma.perm.ru> <8CC54339-0028-4CE4-9AAD-2248CD4E2FC9@lafn.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 23, 2015 at 3:57 AM, Doug Hardie <bc979@lafn.org> wrote: > >> On 23 September 2015, at 01:44, Eugene M. Zheganin <emz@norma.perm.ru> w= rote: >> >> Hi. >> >> I'm trying to understand why the sshd still starts after local daemons, >> out-of-the-box, and what it takes to make this extremely vital service >> to start before non-system (local) ones. I bet I'm not the first one to >> ask, so why isn't this already done ? Seems quite easy for me. > > The fix is quite simple: Add > > # BEFORE: mail > > to /etc/rc.d/sshd > > I tried to submit a PR on that about a year ago, but it never seemed to m= ake it into the PR system. Many of my servers are remote and if there is a= n issue with a port, I still need a way into the system other than driving = for hours. This works. Sshd is started early in the sequence and I can at= least ssh into the server. It won=E2=80=99t help though if there is a syn= tax error in /etc/rc.conf. Those are pretty much fatal. > This technique works. But if you use it, then before you reboot, remember to run "rcorder /etc/rc.d/* /usr/local/etc/rc.d/*" and make sure there aren't any errors about "Circular dependency". If there are, then the service startup order is almost guaranteed to be something you don't want. -Alan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2gUOE%2BM1m=FUKjw6GW8s7TwY5O7sXqZ_aNDcCeXmpaV4w>