mirror of
https://codeberg.org/privacy1st/nix-git
synced 2025-01-12 05:06:06 +01:00
ssh: disable KbdInteractiveAuthentication by only allowing PubkeyAuthentication
This commit is contained in:
parent
40ed2bc37b
commit
9d5337012d
@ -18,10 +18,22 @@
|
||||
# Enabling this is required for commands such as sftp and sshfs.
|
||||
allowSFTP = false;
|
||||
|
||||
settings = {
|
||||
# Use authorized keys only.
|
||||
PasswordAuthentication = false;
|
||||
# Only authentication method should be public key.
|
||||
#
|
||||
# https://man.archlinux.org/man/core/openssh/sshd_config.5.en#AuthenticationMethods
|
||||
# - We change the default of AuthenticationMethods from `any` to `publickey`.
|
||||
# - Furthermore, we explicitly PubkeyAuthentication to its default value `yes`.
|
||||
#
|
||||
# https://nixos.wiki/wiki/SSH_public_key_authentication#SSH_server_config
|
||||
# Alternatively we could use
|
||||
# settings.PasswordAuthentication = false;
|
||||
# settings.KbdInteractiveAuthentication = false;
|
||||
extraConfig = ''
|
||||
AuthenticationMethods publickey
|
||||
PubkeyAuthentication yes
|
||||
'';
|
||||
|
||||
settings = {
|
||||
#
|
||||
# https://infosec.mozilla.org/guidelines/openssh
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user