mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
chore(hakurei): disable ssh password auth
This commit is contained in:
parent
ca48f9407e
commit
f87da5107b
1 changed files with 4 additions and 5 deletions
|
|
@ -4,7 +4,7 @@
|
|||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib.modules) mkAfter;
|
||||
inherit (lib.modules) mkAfter mkForce;
|
||||
sshPort = 41022;
|
||||
username = "tf-proxmox";
|
||||
sshJump = pkgs.writeShellScript "ssh-jump-${username}" ''
|
||||
|
|
@ -28,15 +28,14 @@ in {
|
|||
|
||||
services.openssh = {
|
||||
ports = mkAfter [ sshPort ];
|
||||
settings = {
|
||||
KbdInteractiveAuthentication = true;
|
||||
PasswordAuthentication = true;
|
||||
};
|
||||
extraConfig = mkAfter ''
|
||||
Match User ${username}
|
||||
KbdInteractiveAuthentication yes
|
||||
ForceCommand ${sshJump}
|
||||
'';
|
||||
};
|
||||
# required for kbd or password authentication
|
||||
security.pam.services.sshd.unixAuth = mkForce true;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue