From 2211b9b2182e9ed168020fcef99dbc12ee1c82be Mon Sep 17 00:00:00 2001 From: Jan Klare Date: Thu, 9 Jan 2025 13:49:39 +0000 Subject: [PATCH] quick-setup: allow disabling setup-sshd from environment var (#2383) * by default, the quick-setup.sh script also configures sshd to prevent locking when using unknown keys in the auth process * this patch documents the function itself as well as adds and documents the new option to disable it via an environment variable Signed-off-by: Jan Klare --- docs/install.md | 8 ++++++++ utils/quick-setup.sh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/install.md b/docs/install.md index 207419ef6..ce048eb04 100644 --- a/docs/install.md +++ b/docs/install.md @@ -38,6 +38,14 @@ To install all components at once, run the following command on any of the suppo curl -sL https://containerlab.dev/setup | sudo -E bash -s "all" ``` +By default, this will also configure sshd on the system to increase max auth tries so unknown keys don't lock ssh attempts. +This behaviour can be turned off by setting the environment variable "SETUP_SSHD" to "false" **before** running the command shown above. +The environment variable can be set and exported with the command shown below. + +```bash +export SETUP_SSHD="false" +``` + To complete installation and enable sudo-less `docker` command execution, please run `newgrp docker` or logout and log back in. diff --git a/utils/quick-setup.sh b/utils/quick-setup.sh index 207a3d128..f149de5bc 100644 --- a/utils/quick-setup.sh +++ b/utils/quick-setup.sh @@ -1,5 +1,5 @@ DISTRO_TYPE="" -SETUP_SSHD="true" +SETUP_SSHD="${SETUP_SSHD:-true}" # Docker version that will be installed by this install script. DOCKER_VERSION="26.1.4"