Jan_E
Verified User
In the standard DA setup new SSH-users are appended to the end of /etc/ssh/sshd_config. However if you want to use Match User, this directive also has to be at the end of sshd_config. I wanted to grant Password Authentication to only a few users:
I can add this to the end of sshd_config, restart sshd and it seems OK.
But when you add a new user with SSH access, sshd does not restart. Error message:
The only way to prevent this seems to be to change
in directadmin.conf into
so Directadmin will not generate a sshd_config with errors in it.
The big disadvantage: you cannot use the DA interface anymore to manage SSH access. Can this be changed?
Code:
PasswordAuthentication no
Match User newuser99
PasswordAuthentication yes
But when you add a new user with SSH access, sshd does not restart. Error message:
Code:
[root@vps2 ~]# service sshd restart && service sshd status
Stopping sshd: [OK]
Starting sshd: /etc/ssh/sshd_config line 158: Directive 'AllowUsers' is not allowed within a Match block
Code:
sshdconfig=/etc/ssh/sshd_config
Code:
sshdconfig=/etc/ssh/sshd_config.placebo
The big disadvantage: you cannot use the DA interface anymore to manage SSH access. Can this be changed?