Jakub Czajka [Sun, 25 Sep 2022 15:27:55 +0000 (17:27 +0200)]
[sshd] Listen on a non-standard port.
By default `sshd` listens on port 22. Most attack scripts are written
for this configuration. This commit changes the port to 72, which is
not used by any other popular service.
Jakub Czajka [Sun, 25 Sep 2022 15:11:45 +0000 (17:11 +0200)]
[sshd] Disable password authentication.
Client can authenticate with `sshd` through one of following
authentication methods (corresponding sshd_config option in brackets):
- host-based (`HostbasedAuthentication`),
- public key (`PubkeyAuthentication`),
- challenge-response (`ChallengeResponseAuthentication`),
- password (`PasswordAuthentication`).
By default, only `PubkeyAuthentication` and `PasswordAuthentication`
are enabled. This commit disables `PasswordAuthentication`. Users
can now login only using public key authentication.