diff --git a/how-to-configure-hardened-debian-server/README.md b/how-to-configure-hardened-debian-server/README.md index 8c89916..753e89c 100644 --- a/how-to-configure-hardened-debian-server/README.md +++ b/how-to-configure-hardened-debian-server/README.md @@ -2,8 +2,8 @@ Title: How to configure hardened Debian server Description: Learn how to configure hardened Debian server. Author: Sun Knudsen -Contributors: Sun Knudsen -Reviewers: +Contributors: Sun Knudsen , Go Compile +Reviewers: Go Compile Publication date: 2020-11-27T10:00:26.806Z Listed: true --> @@ -165,6 +165,18 @@ su - ```shell sed -i -E 's/^(#)?PermitRootLogin (prohibit-password|yes)/PermitRootLogin no/' /etc/ssh/sshd_config sed -i -E 's/^(#)?PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config +``` + +#### Limit login attempts and use `Ed25519` host key + +```shell +sed -i -E 's/^(#)?MaxAuthTries 6/MaxAuthTries 2/' /etc/ssh/sshd_config +sed -i -E 's/^(#)?HostKey \/etc\/ssh\/ssh_host_ed25519_key/HostKey \/etc\/ssh\/ssh_host_ed25519_key/' /etc/ssh/sshd_config +``` + +#### Restart SSH daemon + +```shell systemctl restart ssh ```