Unable to login to server via SSH

I appended 2 lines at the end of /etc /ssh /sshd_config.

AlllowGroups admins
AllowUsers ssh2

added these 2 lines, because diagnostic from Yunohost advised that these 2 directive to be in /etc/ssh/sshd_config file.

reason for choosing “admins”, because I thought since “admins” group is created by Yunohost to enable users under this group be able to have SSH administrative rights.

ssh2 is a user I created using the following commands

adduser ssh1

usermod -aG sudo ssh2

nano /etc/ssh/sshd_config
AllowUsers ssh2

id ssh2 — to show ssh2 has root privileges

added this line at the end of file /etc/ssh/sshd_config
AllowUsers ssh1

systemctl restart sshd

logout the existing remote terminal

ssh ssh2@“IP address”

However, now I am not able to login even with the correct password.,
with error message “Permission denied, please try again.”

And the worst part is I can’t log in using my normal Yunohost admin account like before,
all log in attempts results in “Permission denied, please try again.”

Please help

But why not force-regen the conf to use YunoHost’s recommended configuration x_x …

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.