temp ssh
This commit is contained in:
parent
409d5f46ee
commit
0def55578e
|
@ -10,13 +10,14 @@
|
|||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
|
||||
|
||||
AllowUsers = [ "user" "tasia" ];
|
||||
AllowUsers = ["user" "tasia"];
|
||||
|
||||
# Public key authentiation only
|
||||
PasswordAuthentication = false;
|
||||
ChallengeResponseAuthentication = false;
|
||||
|
||||
ChallengeResponseAuthentication = true;
|
||||
KbdInteractiveAuthentication = true;
|
||||
AuthenticationMethods = "publickey,keyboard-interactive";
|
||||
};
|
||||
extraConfig = ''
|
||||
# Only allow SSH v2
|
||||
|
@ -40,16 +41,25 @@
|
|||
X11Forwarding no
|
||||
AllowAgentForwarding no
|
||||
AllowStreamLocalForwarding no
|
||||
AuthenticationMethods publickey
|
||||
'';
|
||||
};
|
||||
|
||||
security.pam = {
|
||||
services.sshd.googleAuthenticator.enable = true;
|
||||
security.pam.services = {
|
||||
sshd.text = ''
|
||||
account required pam_unix.so # unix (order 10900)
|
||||
|
||||
auth required ${pkgs.google-authenticator}/lib/security/pam_google_authenticator.so nullok no_increment_hotp # google_authenticator (order 12500)
|
||||
# auth sufficient pam_permit.so
|
||||
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0 # env (order 10100)
|
||||
session required pam_unix.so # unix (order 10200)
|
||||
session required pam_loginuid.so # loginuid (order 10300)
|
||||
session optional ${pkgs.systemd}/lib/security/pam_systemd.so # systemd (order 12000)
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
google-authenticator
|
||||
];
|
||||
}
|
||||
# ssh R6: StrictHostKeyChecking ask
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
# Peripherals
|
||||
allow id 046d:c08b serial "178D316C3832" name "G502 HERO Gaming Mouse"
|
||||
allow id 18d1:4ee1 serial "28051FDH200ATC" name "Pixel 7"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
6
dotfiles/.gitconfig
Normal file
6
dotfiles/.gitconfig
Normal file
|
@ -0,0 +1,6 @@
|
|||
[user]
|
||||
signingkey = /home/tasia/.ssh/id_ed25519
|
||||
[gpg]
|
||||
format = ssh
|
||||
[commit]
|
||||
gpgsign = true
|
Loading…
Reference in a new issue