Disable SSH password authentication on all hosts #11
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
polen/nixos#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
No host sets
services.openssh.settings.PasswordAuthentication = false, so the NixOS default (password login allowed) applies everywhere. There is no fail2ban.polenis inwheel.openssh.authorizedKeysdeclared at all, so they are password-only.Fix
PasswordAuthentication = falseandKbdInteractiveAuthentication = falseon every host (a shared module undermodules/fits).services.fail2ban.enable = trueon the server.2222 # sshfirewall entry on the server.Caution
Deploy keys first and confirm key login works before the switch that disables passwords.