Skip to content
Snippets Groups Projects
Unverified Commit 7d0540d7 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Do some actual SSH configuration improvement

parent 9f4ade01
No related branches found
No related tags found
1 merge request!35SSH configuration
...@@ -16,6 +16,22 @@ ...@@ -16,6 +16,22 @@
# https://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html # https://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html
services.openssh = { services.openssh = {
enable = true; enable = true;
# We don't use SFTP for anything. No reason to expose it.
allowSFTP = false;
# We only allow key-based authentication.
challengeResponseAuthentication = false;
passwordAuthentication = false;
extraConfig = ''
# Possibly this is superfluous considering we don't allow
# password-based authentication at all.
PermitEmptyPasswords no
# Don't allow authentication as random system users.
AllowUsers root
'';
}; };
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment