From 94ed6d3b77815116a5294d7f59740f6c85f43cea Mon Sep 17 00:00:00 2001 From: Eugene Abramchuk Date: Fri, 29 Nov 2024 18:05:58 +0100 Subject: [PATCH] Adjust sed to apply to uncommented PermitRootLogin in /etc/ssh/sshd_config In some Debian distributives (i.e. Debian 12 standard bookworm image used in GCP) `PermitRootLogin` is already uncommented; the regex in the exercise would skip it. The suggested change will act upon either uncommented line or commented. --- docs/03-compute-resources.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/03-compute-resources.md b/docs/03-compute-resources.md index 85691d5..0138f0e 100644 --- a/docs/03-compute-resources.md +++ b/docs/03-compute-resources.md @@ -44,7 +44,7 @@ Edit the `/etc/ssh/sshd_config` SSH daemon configuration file and set the `Permi ```bash sed -i \ - 's/^#PermitRootLogin.*/PermitRootLogin yes/' \ + 's/^#*PermitRootLogin.*/PermitRootLogin yes/' \ /etc/ssh/sshd_config ```