From a063b63d1c86a1f30dac670cea17f2f24e9c944e Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 27 Dec 2021 15:35:02 +0100 Subject: [PATCH] ssh config : Invert the password_authentication value check to be more resilient in case something goes wrong while fetching / parsing the value --- data/templates/ssh/sshd_config | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/templates/ssh/sshd_config b/data/templates/ssh/sshd_config index 22f0697d9..b6d4111ee 100644 --- a/data/templates/ssh/sshd_config +++ b/data/templates/ssh/sshd_config @@ -2,7 +2,7 @@ # by YunoHost Protocol 2 -# PLEASE: to change ssh port properly in YunoHost, use this command +# PLEASE: if you wish to change the ssh port properly in YunoHost, use this command: # yunohost settings set security.ssh.port -v Port {{ port }} @@ -55,12 +55,12 @@ PermitEmptyPasswords no ChallengeResponseAuthentication no UsePAM yes -# PLEASE: to force everybody to authenticate using ssh keys, run this command: +# PLEASE: if you wish to force everybody to authenticate using ssh keys, run this command: # yunohost settings set security.ssh.password_authentication -v no -{% if password_authentication == "True" %} -#PasswordAuthentication yes -{% else %} +{% if password_authentication == "False" %} PasswordAuthentication no +{% else %} +#PasswordAuthentication yes {% endif %} # Post-login stuff