ldap: only allow ssh key login on linux servers
This commit is contained in:
parent
e748eb306a
commit
d1b79da77c
1 changed files with 10 additions and 0 deletions
|
@ -54,6 +54,16 @@
|
|||
# give users a home dir
|
||||
security.pam.services.sshd.makeHomeDir = true;
|
||||
|
||||
services.openssh = {
|
||||
# only allow ssh keys
|
||||
passwordAuthentication = false;
|
||||
|
||||
# tell users where tehy cna setup their ssh key
|
||||
banner = ''
|
||||
If you get 'Permission denied (publickey,keyboard-interactive)' you need to add an ssh key on https://${cfg.address}
|
||||
'';
|
||||
};
|
||||
|
||||
services.sssd = {
|
||||
enable = true;
|
||||
|
||||
|
|
Loading…
Reference in a new issue