Harden OpenSSH service
This commit is contained in:
parent
36b2aa044f
commit
1d41915773
1 changed files with 15 additions and 1 deletions
|
|
@ -1,6 +1,20 @@
|
|||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
settings = {
|
||||
KbdInteractiveAuthentication = false;
|
||||
# Use key exchange algorithms recommended by `nixpkgs#ssh-audit`
|
||||
KexAlgorithms = [
|
||||
"curve25519-sha256"
|
||||
"curve25519-sha256@libssh.org"
|
||||
"diffie-hellman-group16-sha512"
|
||||
"diffie-hellman-group18-sha512"
|
||||
"sntrup761x25519-sha512@openssh.com"
|
||||
];
|
||||
PasswordAuthentication = false;
|
||||
StreamLocalBindUnlink = true; # unbind gnupg sockets if they exists
|
||||
UseDns = false;
|
||||
X11Forwarding = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue