mirror of
https://github.com/kelseyhightower/kubernetes-the-hard-way.git
synced 2025-09-18 01:50:40 +03:00
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.
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
|
Reference in New Issue
Block a user