Merge 6746a4d00a
into 0d3aa55231
This commit is contained in:
commit
edb0e8145c
1 changed files with 14 additions and 2 deletions
|
@ -2,8 +2,8 @@
|
||||||
Title: How to configure hardened Debian server
|
Title: How to configure hardened Debian server
|
||||||
Description: Learn how to configure hardened Debian server.
|
Description: Learn how to configure hardened Debian server.
|
||||||
Author: Sun Knudsen <https://github.com/sunknudsen>
|
Author: Sun Knudsen <https://github.com/sunknudsen>
|
||||||
Contributors: Sun Knudsen <https://github.com/sunknudsen>
|
Contributors: Sun Knudsen <https://github.com/sunknudsen>, Go Compile <https://github.com/go-compile>
|
||||||
Reviewers:
|
Reviewers: Go Compile <https://github.com/go-compile>
|
||||||
Publication date: 2020-11-27T10:00:26.806Z
|
Publication date: 2020-11-27T10:00:26.806Z
|
||||||
Listed: true
|
Listed: true
|
||||||
Pinned:
|
Pinned:
|
||||||
|
@ -166,6 +166,18 @@ su -
|
||||||
```shell
|
```shell
|
||||||
sed -i -E 's/^(#)?PermitRootLogin (prohibit-password|yes)/PermitRootLogin no/' /etc/ssh/sshd_config
|
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
|
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
|
systemctl restart ssh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue