From c77f005307e9a19bc69546e1834fd31d8a20002b Mon Sep 17 00:00:00 2001 From: Max-Julian Pogner Date: Sat, 4 Jan 2025 01:09:33 +0100 Subject: [PATCH] docs: borg-serve: simplify example of env in authorized_keys see #8318 so long as it can be assumed that the user has configured a POSIX compliant login shell, using a simple command [1] looks cleaner, as no ``export`` or ``;`` are used. [1] Section "2.9.1 Simple Commands" in volume "Shell & Utilities" of POSIX.1-2024 --- docs/usage/serve.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/usage/serve.rst b/docs/usage/serve.rst index 9008a143a..ef2105389 100644 --- a/docs/usage/serve.rst +++ b/docs/usage/serve.rst @@ -29,10 +29,12 @@ locations like ``/etc/environment`` or in the forced command itself (example bel # Set a BORG_XXX environment variable on the "borg serve" side $ cat ~/.ssh/authorized_keys - command="export BORG_XXX=value; borg serve [...]",restrict ssh-rsa [...] + command="BORG_XXX=value borg serve [...]",restrict ssh-rsa [...] .. note:: - The examples above use the ``restrict`` directive. This does automatically + The examples above use the ``restrict`` directive and assumes a POSIX + compliant shell set as the user's login shell. + This does automatically block potential dangerous ssh features, even when they are added in a future update. Thus, this option should be preferred.