[PATCH v2 06/14] tests/vm/freebsd: Reload the sshd configuration

Alex Bennée posted 14 patches 9 months, 3 weeks ago
Maintainers: "Philippe Mathieu-Daudé" <philmd@linaro.org>, Chris Wulff <crwulff@gmail.com>, Marek Vasut <marex@denx.de>, Max Filippov <jcmvbkbc@gmail.com>, Paolo Bonzini <pbonzini@redhat.com>, "Alex Bennée" <alex.bennee@linaro.org>, Thomas Huth <thuth@redhat.com>, Riku Voipio <riku.voipio@iki.fi>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Laurent Vivier <laurent@vivier.eu>, Aurelien Jarno <aurelien@aurel32.net>, Jiaxun Yang <jiaxun.yang@flygoat.com>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Palmer Dabbelt <palmer@dabbelt.com>, Alistair Francis <alistair.francis@wdc.com>, Bin Meng <bin.meng@windriver.com>, Weiwei Li <liwei1518@gmail.com>, Daniel Henrique Barboza <dbarboza@ventanamicro.com>, Liu Zhiwei <zhiwei_liu@linux.alibaba.com>, Wainer dos Santos Moschetta <wainersm@redhat.com>, Beraldo Leal <bleal@redhat.com>, Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Ed Maste <emaste@freebsd.org>, Li-Wen Hsu <lwhsu@freebsd.org>
[PATCH v2 06/14] tests/vm/freebsd: Reload the sshd configuration
Posted by Alex Bennée 9 months, 3 weeks ago
From: Ilya Leoshkevich <iii@linux.ibm.com>

After console_sshd_config(), the SSH server needs to be nudged to pick
up the new configs. The scripts for the other BSD flavors already do
this with a reboot, but a simple reload is sufficient.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-Id: <20240206002344.12372-3-iii@linux.ibm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/freebsd | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/vm/freebsd b/tests/vm/freebsd
index b581bd17fb7..1247f40a385 100755
--- a/tests/vm/freebsd
+++ b/tests/vm/freebsd
@@ -108,6 +108,7 @@ class FreeBSDVM(basevm.BaseVM):
         prompt = "root@freebsd:~ #"
         self.console_ssh_init(prompt, "root", self._config["root_pass"])
         self.console_sshd_config(prompt)
+        self.console_wait_send(prompt, "service sshd reload\n")
 
         # setup virtio-blk #1 (tarfile)
         self.console_wait(prompt)
-- 
2.39.2


Re: [PATCH v2 06/14] tests/vm/freebsd: Reload the sshd configuration
Posted by Warner Losh 9 months, 3 weeks ago
On Wed, Feb 7, 2024 at 9:38 AM Alex Bennée <alex.bennee@linaro.org> wrote:

> From: Ilya Leoshkevich <iii@linux.ibm.com>
>
> After console_sshd_config(), the SSH server needs to be nudged to pick
> up the new configs. The scripts for the other BSD flavors already do
> this with a reboot, but a simple reload is sufficient.
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> Message-Id: <20240206002344.12372-3-iii@linux.ibm.com>
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/vm/freebsd | 1 +
>  1 file changed, 1 insertion(+)
>

Reviewed-by: Warner Losh <imp@bsdimp.com>



> diff --git a/tests/vm/freebsd b/tests/vm/freebsd
> index b581bd17fb7..1247f40a385 100755
> --- a/tests/vm/freebsd
> +++ b/tests/vm/freebsd
> @@ -108,6 +108,7 @@ class FreeBSDVM(basevm.BaseVM):
>          prompt = "root@freebsd:~ #"
>          self.console_ssh_init(prompt, "root", self._config["root_pass"])
>          self.console_sshd_config(prompt)
> +        self.console_wait_send(prompt, "service sshd reload\n")
>
>          # setup virtio-blk #1 (tarfile)
>          self.console_wait(prompt)
> --
> 2.39.2
>
>