Reloading sshd without getting disconnected

S. Anthony Sequeira tony at sequeira.org.uk
Sat Dec 25 03:28:14 PST 2004


On Sun, 2004-12-26 at 00:16 +1300, Simon Geard wrote:
> On Fri, 2004-12-24 at 23:19 +0100, Laurens Blankers wrote:
> > I saw someone on a Debian system reloading sshd over a ssh connection
> > without getting disconnected.
> > 
> > Does anyone know how the Debian people pull this off?
> 
> Are they just sending a HUP signal (kill -HUP) to the process? By
> convention, daemons should respond to such a signal by reloading their
> configuration file - not sure if sshd is one of them.

Yes they do.  But so does the reload function in BLFS (mine at least).

And Debian does *not* drop the connection, but BLFS does.  The man page
says:

     sshd rereads its configuration file when it receives a hangup
signal,
     SIGHUP, by executing itself with the name and options it was
started
     with, e.g., /usr/sbin/sshd.

It looks to me like Debian are doing something  special in their
equivalent of functions, I couldn't be arsed to investigate this further
right now.

> Note - that's not the same as reloading the sshd executable itself. I
> can't think of any way of doing that without dropping the connection.
> 
> Simon.
-- 
Executive ability is deciding quickly and getting somebody else to do
the work.
-- John G. Pollard





More information about the blfs-support mailing list