/etc/init.d/ssh restart不会重新加载configuration

我已将chrootconfiguration添加到我的/etc/ssh/sshd_config

我使用/etc/init.d/ssh reload重新加载configuration文件,然后尝试使用SFTP客户端进行连接,但没有任何更改,用户可以login但不是chroot。

但是,如果我使用/usr/sbin/sshd -p2222手动启动SSH守护程序(在不同的端口上), /usr/sbin/sshd -p2222加载新的configuration并应用chroot。

任何提示为什么/etc/init.d/ssh reload不会实际上重新加载configuration?

附加信息:

  • 同样的问题发生,如果我使用restart
  • 在重新加载/重新启动时,我有一个打开的连接到服务器的根访问
  • 我正在运行Debian Wheezy。

而不是运行/etc/init.d/ssh restart使用service ssh restart

在Ubuntu 14.04.2上,直接调用init脚本时不会发生configuration更改。 Debian在这里很可能是一样的。

事实certificate,既不restart也不stop + start就足够了,因为它不会杀死sshd的正在运行的守护进程。

我不得不抢到服务器的物理访问权限,停止,然后kill <sshd PID> (以便服务器不会接受任何新的传入连接),然后再次启动守护进程。